Include golems (snowmen, iron golems and shulkers) in the animal-interact flag.

This commit is contained in:
Alexander Söderberg 2020-04-09 21:38:24 +02:00
parent dada7dbb86
commit 0d26111fa7

View File

@ -46,6 +46,7 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.FallingBlock; import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.Fireball; import org.bukkit.entity.Fireball;
import org.bukkit.entity.Golem;
import org.bukkit.entity.Hanging; import org.bukkit.entity.Hanging;
import org.bukkit.entity.HumanEntity; import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.ItemFrame; import org.bukkit.entity.ItemFrame;
@ -2569,7 +2570,7 @@ public class PlayerEvents extends PlotListener implements Listener {
if (entity instanceof Monster && plot.getFlag(HostileInteractFlag.class)) { if (entity instanceof Monster && plot.getFlag(HostileInteractFlag.class)) {
return; return;
} }
if (entity instanceof Animals && plot.getFlag(AnimalInteractFlag.class)) { if ((entity instanceof Animals || entity instanceof Golem) && plot.getFlag(AnimalInteractFlag.class)) {
return; return;
} }
if (entity instanceof Tameable && ((Tameable) entity).isTamed() && plot if (entity instanceof Tameable && ((Tameable) entity).isTamed() && plot