Block ignite only for PvP, not for PvE (#1967) @Brokkonaut

Players with god mode enabled could not ignite mobs with bows while only igniting players should be blocked.
This commit is contained in:
Brokkonaut 2018-05-26 21:34:31 +02:00 committed by md678685
parent 3237632eb4
commit 030eb3375b
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ public class EssentialsEntityListener implements Listener {
@EventHandler(priority = EventPriority.MONITOR)
public void onEntityCombustByEntity(final EntityCombustByEntityEvent event) {
if (event.getCombuster() instanceof Arrow) {
if (event.getCombuster() instanceof Arrow && event.getEntity() instanceof Player) {
Arrow combuster = (Arrow) event.getCombuster();
if (combuster.getShooter() instanceof Player) {
final User srcCombuster = ess.getUser(((Player) combuster.getShooter()).getUniqueId());