From f1d10c96bcd46d001be9b01494561dc6cac39675 Mon Sep 17 00:00:00 2001 From: Cheezybo99 Date: Sun, 19 Apr 2020 11:32:09 +0100 Subject: [PATCH] Added PERMISSIONS_ADMIN_CHAT_BYPASS enum for the permission plots.admin.chat.bypass allowing users to bypass the plot chat security feature. --- .../main/java/com/plotsquared/bukkit/listener/PlayerEvents.java | 2 +- .../main/java/com/plotsquared/core/configuration/Captions.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java index ae4e9369d..732c2fe7f 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java @@ -946,7 +946,7 @@ public class PlayerEvents extends PlotListener implements Listener { || area.isForcingPlotChat())) { return; } - if (plot.isDenied(plotPlayer.getUUID()) && !Permissions.hasPermission(plotPlayer, Captions.PERMISSION_COMMANDS_CHAT)) { + if (plot.isDenied(plotPlayer.getUUID()) && !Permissions.hasPermission(plotPlayer, Captions.PERMISSION_ADMIN_CHAT_BYPASS)) { return; } event.setCancelled(true); diff --git a/Core/src/main/java/com/plotsquared/core/configuration/Captions.java b/Core/src/main/java/com/plotsquared/core/configuration/Captions.java index fc72306a4..7336e6cd2 100644 --- a/Core/src/main/java/com/plotsquared/core/configuration/Captions.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Captions.java @@ -183,6 +183,7 @@ public enum Captions implements Caption { PERMISSION_ALIAS_SET_OBSOLETE("plots.set.alias", "static.permissions"), // Note this is for backwards compatibility PERMISSION_ALIAS_SET("plots.alias.set", "static.permissions"), PERMISSION_ALIAS_REMOVE("plots.alias.remove", "static.permissions"), + PERMISSION_ADMIN_CHAT_BYPASS("plots.admin.chat.bypass", "static.permissions"), // // CONSOLE_JAVA_OUTDATED(