From 0d26111fa7ff4354396361b8d0e323b4c6268f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Thu, 9 Apr 2020 21:38:24 +0200 Subject: [PATCH] Include golems (snowmen, iron golems and shulkers) in the animal-interact flag. --- .../plotsquared/bukkit/listeners/PlayerEvents.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java index 6d481d955..af85bf506 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java @@ -46,6 +46,7 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.FallingBlock; import org.bukkit.entity.Fireball; +import org.bukkit.entity.Golem; import org.bukkit.entity.Hanging; import org.bukkit.entity.HumanEntity; import org.bukkit.entity.ItemFrame; @@ -2569,7 +2570,7 @@ public class PlayerEvents extends PlotListener implements Listener { if (entity instanceof Monster && plot.getFlag(HostileInteractFlag.class)) { return; } - if (entity instanceof Animals && plot.getFlag(AnimalInteractFlag.class)) { + if ((entity instanceof Animals || entity instanceof Golem) && plot.getFlag(AnimalInteractFlag.class)) { return; } if (entity instanceof Tameable && ((Tameable) entity).isTamed() && plot