Fix the jail stop and also add some alternatives.

This commit is contained in:
graywolf336 2014-01-30 14:23:50 -06:00
parent 1e632017c7
commit f4e735eda4
2 changed files with 10 additions and 0 deletions

View File

@ -176,6 +176,7 @@ public class JailHandler {
//Puts the commands in the HashMap //Puts the commands in the HashMap
addCmds.put("list", new JailList()); addCmds.put("list", new JailList());
addCmds.put("l", new JailList());
addCmds.put("mute", new Mute()); addCmds.put("mute", new Mute());
addCmds.put("m", new Mute()); addCmds.put("m", new Mute());
addCmds.put("reload", new Reload()); addCmds.put("reload", new Reload());
@ -187,6 +188,7 @@ public class JailHandler {
addCmds.put("teleout", new TeleOut()); addCmds.put("teleout", new TeleOut());
addCmds.put("teleportout", new TeleOut()); addCmds.put("teleportout", new TeleOut());
addCmds.put("version", new Version()); addCmds.put("version", new Version());
addCmds.put("ver", new Version());
addCmds.put("v", new Version()); addCmds.put("v", new Version());
} }

View File

@ -17,14 +17,22 @@ import com.graywolf336.jail.command.CommandInfo;
) )
public class JailStopCommand implements Command { public class JailStopCommand implements Command {
public boolean execute(JailManager jm, CommandSender sender, String... args) { public boolean execute(JailManager jm, CommandSender sender, String... args) {
boolean nothing = true;
if(jm.isCreatingACell(sender.getName())) { if(jm.isCreatingACell(sender.getName())) {
jm.removeCellCreationPlayer(sender.getName()); jm.removeCellCreationPlayer(sender.getName());
sender.sendMessage(ChatColor.RED + "You have stopped creating cells."); sender.sendMessage(ChatColor.RED + "You have stopped creating cells.");
nothing = false;
} }
if(jm.isCreatingAJail(sender.getName())) { if(jm.isCreatingAJail(sender.getName())) {
jm.removeJailCreationPlayer(sender.getName()); jm.removeJailCreationPlayer(sender.getName());
sender.sendMessage(ChatColor.RED + "You have stopped creating a jail."); sender.sendMessage(ChatColor.RED + "You have stopped creating a jail.");
nothing = false;
}
if(nothing) {
sender.sendMessage(ChatColor.RED + "You've stopped creating....nothing.");
} }
return true; return true;