From 434d219f4170b7ec35466ef21531ece133853704 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 23 Aug 2019 17:18:25 +0100 Subject: [PATCH] Add plots.admin.area.sudo for permission to commands of the form "/plot " as well as plots.admin --- .../plotsquared/plot/commands/MainCommand.java | 2 +- .../intellectualsites/plotsquared/plot/config/Captions.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java index d4a1592c8..31095cd75 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/MainCommand.java @@ -200,7 +200,7 @@ public class MainCommand extends Command { PlotArea area = player.getApplicablePlotArea(); Plot newPlot = Plot.fromString(area, args[0]); if (newPlot != null && (player instanceof ConsolePlayer || newPlot.getArea() - .equals(area) || Permissions.hasPermission(player, Captions.PERMISSION_ADMIN)) + .equals(area) || Permissions.hasPermission(player, Captions.PERMISSION_ADMIN) || Permissions.hasPermission(player, Captions.PERMISSION_ADMIN_SUDO_AREA)) && !newPlot.isDenied(player.getUUID())) { Location newLoc = newPlot.getCenter(); if (player.canTeleport(newLoc)) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java index f9f33c20e..8b172758d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java @@ -46,6 +46,7 @@ public enum Captions { // PERMISSION_STAR("*", "static.permissions"), PERMISSION_ADMIN("plots.admin", "static.permissions"), + PERMISSION_ADMIN_SUDO_AREA("plots.admin.area.sudo", "static.permissions"), PERMISSION_PROJECTILE_UNOWNED("plots.projectile.unowned", "static.permissions"), PERMISSION_PROJECTILE_OTHER("plots.projectile.other", "static.permissions"), PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS("plots.admin.interact.blockedcommands", "static.permissions"),