From d09c847d7741bd3f450399b22207a16e8de2d7e2 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 14 Nov 2026 20:35:13 -0800 Subject: [PATCH] Fix /boxadmin place permission setPermission() is prefixed with the game mode's permission prefix, so 'boxed.commands.boxadmin.place' became 'boxed.boxed.commands.boxadmin.place'. Use 'admin.place' (boxed.admin.place) like the other admin commands and declare it in addon.yml with default op. Co-Authored-By: Claude Opus 5.5 --- .../bentobox/boxed/commands/AdminPlaceStructureCommand.java | 2 +- src/main/resources/addon.yml | 3 +++ .../boxed/commands/AdminPlaceStructureCommandTest.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/boxed/commands/AdminPlaceStructureCommand.java b/src/main/java/world/bentobox/boxed/commands/AdminPlaceStructureCommand.java index 03342a7..4541136 100644 --- a/src/main/java/world/bentobox/boxed/commands/AdminPlaceStructureCommand.java +++ b/src/main/java/world/bentobox/boxed/commands/AdminPlaceStructureCommand.java @@ -67,7 +67,7 @@ public AdminPlaceStructureCommand(CompositeCommand parent) { @Override public void setup() { - this.setPermission("boxed.commands.boxadmin.place"); + this.setPermission("admin.place"); this.setOnlyPlayer(false); this.setParametersHelp("boxed.commands.boxadmin.place.parameters"); this.setDescription("boxed.commands.boxadmin.place.description"); diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index aa84c6d..931d246 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -135,6 +135,9 @@ permissions: boxed.admin.reload: description: Reload the config.yml default: op + boxed.admin.place: + description: Allow use of '/boxadmin place' command - place a structure in a box and record it for future boxes + default: op boxed.admin.delete: description: Let a player completely remove a player (including island) default: op diff --git a/src/test/java/world/bentobox/boxed/commands/AdminPlaceStructureCommandTest.java b/src/test/java/world/bentobox/boxed/commands/AdminPlaceStructureCommandTest.java index b648dfb..eecd401 100644 --- a/src/test/java/world/bentobox/boxed/commands/AdminPlaceStructureCommandTest.java +++ b/src/test/java/world/bentobox/boxed/commands/AdminPlaceStructureCommandTest.java @@ -66,7 +66,7 @@ void setUpCommand() { @Test void testSetup() { assertEquals("place", cmd.getLabel()); - assertEquals("boxed.commands.boxadmin.place", cmd.getPermission()); + assertEquals("admin.place", cmd.getPermission()); assertFalse(cmd.isOnlyPlayer()); }