Add plots.admin.area.sudo for permission to commands of the form "/plot <area> <command...>" as well as plots.admin

This commit is contained in:
dordsor21 2019-08-23 17:18:25 +01:00
parent dc0126b53c
commit 434d219f41
2 changed files with 2 additions and 1 deletions

View File

@ -200,7 +200,7 @@ public class MainCommand extends Command {
PlotArea area = player.getApplicablePlotArea(); PlotArea area = player.getApplicablePlotArea();
Plot newPlot = Plot.fromString(area, args[0]); Plot newPlot = Plot.fromString(area, args[0]);
if (newPlot != null && (player instanceof ConsolePlayer || newPlot.getArea() 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())) { && !newPlot.isDenied(player.getUUID())) {
Location newLoc = newPlot.getCenter(); Location newLoc = newPlot.getCenter();
if (player.canTeleport(newLoc)) { if (player.canTeleport(newLoc)) {

View File

@ -46,6 +46,7 @@ public enum Captions {
//<editor-fold desc="Static Permission"> //<editor-fold desc="Static Permission">
PERMISSION_STAR("*", "static.permissions"), PERMISSION_STAR("*", "static.permissions"),
PERMISSION_ADMIN("plots.admin", "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_UNOWNED("plots.projectile.unowned", "static.permissions"),
PERMISSION_PROJECTILE_OTHER("plots.projectile.other", "static.permissions"), PERMISSION_PROJECTILE_OTHER("plots.projectile.other", "static.permissions"),
PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS("plots.admin.interact.blockedcommands", "static.permissions"), PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS("plots.admin.interact.blockedcommands", "static.permissions"),