From b153debdef9a7c22f4ffabc94ad4bfca7b990400 Mon Sep 17 00:00:00 2001 From: JeromSar Date: Fri, 26 Aug 2016 11:57:39 +0200 Subject: [PATCH] Block sign interaction. Fixes #1831 --- .../totalfreedommod/blocking/InteractBlocker.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java index 49e6a933..30dec0d2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java @@ -33,9 +33,6 @@ public class InteractBlocker extends FreedomService @EventHandler(priority = EventPriority.HIGH) public void onPlayerInteract(PlayerInteractEvent event) { - final Player player = event.getPlayer(); - final FPlayer playerdata = plugin.pl.getPlayer(player); - switch (event.getAction()) { case RIGHT_CLICK_AIR: @@ -98,6 +95,14 @@ public class InteractBlocker extends FreedomService event.setCancelled(true); break; } + + case SIGN: + case SIGN_POST: + case WALL_SIGN: + { + player.sendMessage(ChatColor.GRAY + "Sign interaction is currently disabled."); + break; + } } } }