From 98d0819383234c6dbd780b8828844fdad952d986 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 16 Aug 2016 19:08:33 -0700 Subject: [PATCH] Only show blocked-cmds message when event is cancelled --- .../java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 31ea659b6..d10cff623 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -412,7 +412,6 @@ public class PlayerEvents extends PlotListener implements Listener { pattern = RegExUtil.compiledPatterns.get(s); } if (pattern.matcher(msg).matches()) { - MainUtil.sendMessage(pp, C.COMMAND_BLOCKED); String perm; if (plot.isAdded(pp.getUUID())) { perm = "plots.admin.command.blocked-cmds.shared"; @@ -420,6 +419,7 @@ public class PlayerEvents extends PlotListener implements Listener { perm = "plots.admin.command.blocked-cmds.other"; } if (!Permissions.hasPermission(pp, perm)) { + MainUtil.sendMessage(pp, C.COMMAND_BLOCKED); event.setCancelled(true); } return;