diff --git a/src/main/java/com/graywolf336/jail/JailIO.java b/src/main/java/com/graywolf336/jail/JailIO.java index 3a4c205..41c00da 100644 --- a/src/main/java/com/graywolf336/jail/JailIO.java +++ b/src/main/java/com/graywolf336/jail/JailIO.java @@ -622,7 +622,7 @@ public class JailIO { for(String uuid : prisoners) { String pNode = node + "prisoners." + uuid + "."; Prisoner pris = new Prisoner(uuid, - flat.getString(pNode + "prisoner"), + flat.getString(pNode + "name"), flat.getBoolean(pNode + "muted"), flat.getLong(pNode + "time"), flat.getString(pNode + "jailer"), diff --git a/src/main/java/com/graywolf336/jail/JailMain.java b/src/main/java/com/graywolf336/jail/JailMain.java index b73e722..0a02fae 100644 --- a/src/main/java/com/graywolf336/jail/JailMain.java +++ b/src/main/java/com/graywolf336/jail/JailMain.java @@ -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); diff --git a/src/main/java/com/graywolf336/jail/command/CommandHandler.java b/src/main/java/com/graywolf336/jail/command/CommandHandler.java index 1d654fd..7180192 100644 --- a/src/main/java/com/graywolf336/jail/command/CommandHandler.java +++ b/src/main/java/com/graywolf336/jail/command/CommandHandler.java @@ -61,6 +61,19 @@ public class CommandHandler { //If no matches were found, send them the unknown command message. if(matches.size() == 0) { + if(commandLine.startsWith("jail")) { + String j = commandLine.substring(0, 4); + String a0 = commandLine.substring(4, commandLine.length()); + + ArrayList args2 = new ArrayList(); + for(String s : args) + args2.add(s); + args2.add(a0); + + if(jailmanager.getPlugin().onCommand(sender, null, j, args2.toArray(new String[args2.size()]))) + return; + } + sender.sendMessage(jailmanager.getPlugin().getJailIO().getLanguageString(LangString.UNKNOWNCOMMAND, commandLine)); return; }