mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-23 16:08:18 -05:00
Fix another error in command checker
This commit is contained in:
parent
9e967c9748
commit
2ee056fb2b
2 changed files with 12 additions and 8 deletions
|
@ -44,10 +44,12 @@ class PlayerCommand implements Listener {
|
|||
final boolean isConsoleCommand = false;
|
||||
final String checkedCommand = ServerCommand.checkCommand(sender, command, isConsoleCommand);
|
||||
|
||||
if (checkedCommand != null) {
|
||||
if (checkedCommand.equals("cancel")) {
|
||||
event.setCancelled(true);
|
||||
} else if (checkedCommand != null) {
|
||||
} else {
|
||||
event.setMessage(checkedCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,10 +178,12 @@ class ServerCommand implements Listener {
|
|||
final boolean isConsoleCommand = true;
|
||||
final String checkedCommand = checkCommand(sender, command, isConsoleCommand);
|
||||
|
||||
if (checkedCommand != null) {
|
||||
if (checkedCommand.equals("cancel")) {
|
||||
event.setCancelled(true);
|
||||
} else if (checkedCommand != null) {
|
||||
} else {
|
||||
event.setCommand(checkedCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue