Make bare /f command show help.

Just making the plugin think they actually executed the help command because the help pages are built inside of that class and I'd rather not worry about moving them out of there or easily accessible.
This commit is contained in:
drtshock
2014-07-12 15:50:56 -05:00
parent 2db15f6447
commit 5938a4987e
3 changed files with 1 additions and 24 deletions

View File

@@ -169,14 +169,13 @@ public class P extends MPlugin {
@Override
public boolean handleCommand(CommandSender sender, String commandString, boolean testOnly) {
return sender instanceof Player && FactionsPlayerListener.preventCommand(commandString, (Player) sender) || super.handleCommand(sender, commandString, testOnly);
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] split) {
// if bare command at this point, it has already been handled by MPlugin's command listeners
if (split == null || split.length == 0) {
return true;
return handleCommand(sender, "/f help", false);
}
// otherwise, needs to be handled; presumably another plugin directly ran the command