From 9f14e3f805fa8f94a8810dbb5d80562adf1edacd Mon Sep 17 00:00:00 2001 From: Tigerpanzer_02 <37453987+Tigerpanzer02@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:44:26 +0200 Subject: [PATCH] Fixed removeblock command --- build.gradle.kts | 2 +- .../arguments/admin/arena/SpecialBlockRemoverArgument.java | 3 +-- .../commands/arguments/game/RoleSelectorArgument.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 588da131..6c570746 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ repositories { } dependencies { - implementation("plugily.projects:MiniGamesBox-Classic:1.2.0-SNAPSHOT31") { isTransitive = false } + implementation("plugily.projects:MiniGamesBox-Classic:1.2.0-SNAPSHOT43") { isTransitive = false } compileOnly("org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT") compileOnly("org.jetbrains:annotations:24.0.1") diff --git a/src/main/java/plugily/projects/murdermystery/commands/arguments/admin/arena/SpecialBlockRemoverArgument.java b/src/main/java/plugily/projects/murdermystery/commands/arguments/admin/arena/SpecialBlockRemoverArgument.java index f9bd222d..dc143384 100644 --- a/src/main/java/plugily/projects/murdermystery/commands/arguments/admin/arena/SpecialBlockRemoverArgument.java +++ b/src/main/java/plugily/projects/murdermystery/commands/arguments/admin/arena/SpecialBlockRemoverArgument.java @@ -64,8 +64,7 @@ public void execute(CommandSender sender, String[] args) { || targetBlock.getType() == XMaterial.ENCHANTING_TABLE.parseMaterial()) { for(PluginArena arena : registry.getPlugin().getArenaRegistry().getArenas()) { - Arena pluginArena = - (Arena) registry.getPlugin().getArenaRegistry().getArena(player); + Arena pluginArena = (Arena) registry.getPlugin().getArenaRegistry().getArena(arena.getId()); if(arena == null) { return; } diff --git a/src/main/java/plugily/projects/murdermystery/commands/arguments/game/RoleSelectorArgument.java b/src/main/java/plugily/projects/murdermystery/commands/arguments/game/RoleSelectorArgument.java index 8cda24ab..80bffc3d 100644 --- a/src/main/java/plugily/projects/murdermystery/commands/arguments/game/RoleSelectorArgument.java +++ b/src/main/java/plugily/projects/murdermystery/commands/arguments/game/RoleSelectorArgument.java @@ -41,8 +41,8 @@ public class RoleSelectorArgument implements Listener { public RoleSelectorArgument(ArgumentsRegistry registry) { - registry.mapArgument("murdermystery", new LabeledCommandArgument("roleselector", "murdermystery.roleselector", CommandArgument.ExecutorType.PLAYER, - new LabelData("/mm roleselector", "/mm roleselector", "&7Select a role\n&6Permission: &7murdermystery.roleselector")) { + registry.mapArgument("murdermystery", new LabeledCommandArgument("roleselector", "murdermystery.command.roleselector", CommandArgument.ExecutorType.PLAYER, + new LabelData("/mm roleselector", "/mm roleselector", "&7Select a role\n&6Permission: &7murdermystery.command.roleselector")) { @Override public void execute(CommandSender sender, String[] args) { Player player = (Player) sender;