From ef7dca31ded72f4797b296b3fb6054cac94ff216 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 2 Jun 2018 19:19:57 -0700 Subject: [PATCH] Fixed permissions --- addon.yml | 6 ++++++ .../addon/challenges/commands/ChallengesCommand.java | 2 +- .../commands/admin/ChallengesAdminImportCommand.java | 2 +- .../addon/challenges/commands/admin/CreateChallenge.java | 2 +- .../addon/challenges/commands/admin/CreateSurrounding.java | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/addon.yml b/addon.yml index 36ede7f..0883625 100755 --- a/addon.yml +++ b/addon.yml @@ -11,3 +11,9 @@ permissions: bskyblock.admin.challenges: description: Access challenge admin commands default: op + acidisland.challenges: + description: Let the player use the /challenges command + default: true + acidisland.admin.challenges: + description: Access challenge admin commands + default: op diff --git a/src/main/java/bskyblock/addon/challenges/commands/ChallengesCommand.java b/src/main/java/bskyblock/addon/challenges/commands/ChallengesCommand.java index a93b578..d7d4303 100644 --- a/src/main/java/bskyblock/addon/challenges/commands/ChallengesCommand.java +++ b/src/main/java/bskyblock/addon/challenges/commands/ChallengesCommand.java @@ -29,7 +29,7 @@ public class ChallengesCommand extends CompositeCommand { @Override public void setup() { this.setOnlyPlayer(true); - this.setPermission(getPermissionPrefix() + CHALLENGE_COMMAND); + this.setPermission(CHALLENGE_COMMAND); this.setParameters(CHALLENGE_COMMAND + ".parameters"); this.setDescription(CHALLENGE_COMMAND + ".description"); this.setOnlyPlayer(true); diff --git a/src/main/java/bskyblock/addon/challenges/commands/admin/ChallengesAdminImportCommand.java b/src/main/java/bskyblock/addon/challenges/commands/admin/ChallengesAdminImportCommand.java index aa42a20..f5ce64c 100644 --- a/src/main/java/bskyblock/addon/challenges/commands/admin/ChallengesAdminImportCommand.java +++ b/src/main/java/bskyblock/addon/challenges/commands/admin/ChallengesAdminImportCommand.java @@ -30,7 +30,7 @@ public class ChallengesAdminImportCommand extends CompositeCommand { @Override public void setup() { - this.setPermission(getPermissionPrefix() + "challenges.admin"); + this.setPermission("challenges.admin"); this.setParameters("challenges.admin.import.parameters"); this.setDescription("challenges.admin.import.description"); } diff --git a/src/main/java/bskyblock/addon/challenges/commands/admin/CreateChallenge.java b/src/main/java/bskyblock/addon/challenges/commands/admin/CreateChallenge.java index e8b6454..0f73cc4 100644 --- a/src/main/java/bskyblock/addon/challenges/commands/admin/CreateChallenge.java +++ b/src/main/java/bskyblock/addon/challenges/commands/admin/CreateChallenge.java @@ -27,7 +27,7 @@ public class CreateChallenge extends CompositeCommand { @Override public void setup() { this.setOnlyPlayer(true); - this.setPermission(getPermissionPrefix() + "admin.challenges"); + this.setPermission("admin.challenges"); this.setParameters("challaneges.admin.create.parameters"); this.setDescription("challenges.admin.create.description"); diff --git a/src/main/java/bskyblock/addon/challenges/commands/admin/CreateSurrounding.java b/src/main/java/bskyblock/addon/challenges/commands/admin/CreateSurrounding.java index 916cc04..04a26e5 100644 --- a/src/main/java/bskyblock/addon/challenges/commands/admin/CreateSurrounding.java +++ b/src/main/java/bskyblock/addon/challenges/commands/admin/CreateSurrounding.java @@ -45,7 +45,7 @@ public class CreateSurrounding extends CompositeCommand implements Listener { @Override public void setup() { this.setOnlyPlayer(true); - this.setPermission(getPermissionPrefix() + "admin.challenges"); + this.setPermission("admin.challenges"); this.setParameters("challaneges.admin.create.surrounding.parameters"); this.setDescription("challenges.admin.create.surrounding.description"); }