From dd4a1faede616ccb2970ddd20a73a8698195340d Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 15 Dec 2015 03:32:59 +1100 Subject: [PATCH] Fixes #772 --- .../com/plotsquared/bukkit/listeners/PlayerEvents.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index 6d3b3e12c..4209225a7 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -384,7 +384,15 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen } if (pattern.matcher(msg).matches()) { MainUtil.sendMessage(pp, C.COMMAND_BLOCKED); - event.setCancelled(true); + String perm; + if (plot.isAdded(pp.getUUID())) { + perm = "plots.admin.command.blocked-cmds.shared"; + } else { + perm = "plots.admin.command.blocked-cmds.other"; + } + if (!Permissions.hasPermission(pp, perm)) { + event.setCancelled(true); + } return; } }