Skip to content

Commit ca39e05

Browse files
authored
Allow Non-Bentobox commands as default player (commands) (#1760)
* Update ServerCompatibility.java * Update Default Player Command to support non-bentobox commands
1 parent 64c83f8 commit ca39e05

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/world/bentobox/bentobox/api/commands/island/DefaultPlayerCommand.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ private boolean runCommand(User user, String label, String command, String defau
117117
orElse(false);
118118
} else {
119119
// Command is not a known sub command - try to perform it directly - some plugins trap these commands, like Deluxe menus
120-
return user.performCommand(label + " " + command);
120+
if (command.startsWith("/")) {
121+
// If commands starts with Slash, don't append the prefix
122+
return user.performCommand(command.substring(1));
123+
} else {
124+
return user.performCommand(label + " " + command);
125+
}
121126
}
122127
}
123128
}

0 commit comments

Comments
 (0)