Fix the NPE when providing backward compabitility.

This commit is contained in:
graywolf336 2014-04-27 00:19:23 -05:00
parent 6c55578062
commit 7167bff981

View File

@ -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);