From 8053796341e995ace25ae9251f303d0a5fb1e132 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 17 Feb 2024 09:15:43 +0100 Subject: [PATCH] Update permission of BackupCommand --- BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java | 1 + .../de/steamwar/bausystem/features/backup/BackupCommand.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 0bda77c1..9707d871 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -81,6 +81,7 @@ public class BauSystem extends JavaPlugin implements Listener { SWCommandUtils.addValidator(Player.class, validator(Permission.BUILD)); SWCommandUtils.addValidator(CommandSender.class, validator(Permission.BUILD)); SWCommandUtils.addValidator("supervisor", validator(Permission.SUPERVISOR)); + SWCommandUtils.addValidator("owner", validator(Permission.OWNER)); LinkageUtils.link(); TickListener.impl.init(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java index 6e04d2a5..b7911275 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/backup/BackupCommand.java @@ -62,7 +62,7 @@ public class BackupCommand extends SWCommand { } @Register(value = "create", description = "BACKUP_HELP_CREATE") - public void backupCreate(@Validator("supervisor") Player p) { + public void backupCreate(@Validator("owner") Player p) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) { return; @@ -79,7 +79,7 @@ public class BackupCommand extends SWCommand { } @Register(value = "load", description = "BACKUP_HELP_LOAD") - public void backupLoad(@Validator("supervisor") Player p, @Mapper("backupName") String backupName) { + public void backupLoad(@Validator("owner") Player p, @Mapper("backupName") String backupName) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) { return;