Fix the NPE when providing backward compabitility.
This commit is contained in:
parent
6c55578062
commit
7167bff981
@ -149,7 +149,7 @@ public class JailMain extends JavaPlugin {
|
||||
* Send the command off to the CommandHandler class, that way this main class doesn't get clogged up.
|
||||
*/
|
||||
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
|
||||
if(command.getName().equalsIgnoreCase("jail")) {
|
||||
if(commandLabel.equalsIgnoreCase("jail") || commandLabel.equalsIgnoreCase("j")) {
|
||||
jh.parseCommand(jm, sender, args);
|
||||
}else {
|
||||
cmdHand.handleCommand(jm, sender, command.getName().toLowerCase(), args);
|
||||
|
Loading…
Reference in New Issue
Block a user