Skip to content

Commit

Permalink
Allow Non-Bentobox commands as default player (commands) (#1760)
Browse files Browse the repository at this point in the history
* Update ServerCompatibility.java

* Update Default Player Command to support non-bentobox commands
  • Loading branch information
Fredthedoggy authored May 15, 2021
1 parent 64c83f8 commit ca39e05
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ private boolean runCommand(User user, String label, String command, String defau
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);
}
}
}
}

0 comments on commit ca39e05

Please sign in to comment.