Allow Non-Bentobox commands as default player (commands) (#1760)

* Update ServerCompatibility.java

* Update Default Player Command to support non-bentobox commands
This commit is contained in:
Fredthedoggy 2021-05-15 16:20:09 -04:00 committed by GitHub
parent 64c83f809c
commit ca39e05fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -117,7 +117,12 @@ public abstract class DefaultPlayerCommand extends CompositeCommand {
orElse(false);
} else {
// Command is not a known sub command - try to perform it directly - some plugins trap these commands, like Deluxe menus
return user.performCommand(label + " " + command);
if (command.startsWith("/")) {
// If commands starts with Slash, don't append the prefix
return user.performCommand(command.substring(1));
} else {
return user.performCommand(label + " " + command);
}
}
}
}