From a2eb727e257e09a5d7df6b440ca14f8a0d613709 Mon Sep 17 00:00:00 2001 From: Opachl Date: Sun, 12 Nov 2017 17:34:50 +0100 Subject: [PATCH 1/4] fix: nteraction flag with item_frame nteraction flag with item_frame #1761 --- .../java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index e8f784c5b..470640813 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -60,6 +60,7 @@ import org.bukkit.entity.FallingBlock; import org.bukkit.entity.Fireball; import org.bukkit.entity.Hanging; import org.bukkit.entity.HumanEntity; +import org.bukkit.entity.ItemFrame; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; import org.bukkit.entity.Player; @@ -2198,6 +2199,9 @@ public class PlayerEvents extends PlotListener implements Listener { if (entity instanceof Villager && plot.getFlag(Flags.VILLAGER_INTERACT, false)) { return; } + if (entity instanceof ItemFrame && plot.getFlag(Flags.MISC_INTERACT, false)) { + return; + } if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER)) { MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_OTHER); event.setCancelled(true); From b4e8d782a194f46eebaafb79a32c64162269824b Mon Sep 17 00:00:00 2001 From: Opachl Date: Sun, 12 Nov 2017 17:35:59 +0100 Subject: [PATCH 2/4] Revert "fix: nteraction flag with item_frame" This reverts commit a2eb727e257e09a5d7df6b440ca14f8a0d613709. --- .../java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index 470640813..e8f784c5b 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -60,7 +60,6 @@ import org.bukkit.entity.FallingBlock; import org.bukkit.entity.Fireball; import org.bukkit.entity.Hanging; import org.bukkit.entity.HumanEntity; -import org.bukkit.entity.ItemFrame; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; import org.bukkit.entity.Player; @@ -2199,9 +2198,6 @@ public class PlayerEvents extends PlotListener implements Listener { if (entity instanceof Villager && plot.getFlag(Flags.VILLAGER_INTERACT, false)) { return; } - if (entity instanceof ItemFrame && plot.getFlag(Flags.MISC_INTERACT, false)) { - return; - } if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER)) { MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_OTHER); event.setCancelled(true); From c3f93a196016089e1938489a4b9cc729bcd79989 Mon Sep 17 00:00:00 2001 From: Opachl Date: Sun, 12 Nov 2017 17:36:58 +0100 Subject: [PATCH 3/4] fix: Interaction flag with item_frame Interaction flag with item_frame #1761 --- .../java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index e8f784c5b..2d6c4b328 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -2198,6 +2198,9 @@ public class PlayerEvents extends PlotListener implements Listener { if (entity instanceof Villager && plot.getFlag(Flags.VILLAGER_INTERACT, false)) { return; } + if (entity instanceof ItemFrame && plot.getFlag(Flags.MISC_INTERACT, false)) { + return; + } if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER)) { MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_OTHER); event.setCancelled(true); From c281620d75ae651645eb7d1ec14d78355d354823 Mon Sep 17 00:00:00 2001 From: Opachl Date: Sun, 12 Nov 2017 17:49:14 +0100 Subject: [PATCH 4/4] Update PlayerEvents.java added missing import --- .../main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index 2d6c4b328..470640813 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -60,6 +60,7 @@ import org.bukkit.entity.FallingBlock; import org.bukkit.entity.Fireball; import org.bukkit.entity.Hanging; import org.bukkit.entity.HumanEntity; +import org.bukkit.entity.ItemFrame; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; import org.bukkit.entity.Player;