Fix the jail stop and also add some alternatives.
This commit is contained in:
parent
1e632017c7
commit
f4e735eda4
@ -176,6 +176,7 @@ public class JailHandler {
|
||||
|
||||
//Puts the commands in the HashMap
|
||||
addCmds.put("list", new JailList());
|
||||
addCmds.put("l", new JailList());
|
||||
addCmds.put("mute", new Mute());
|
||||
addCmds.put("m", new Mute());
|
||||
addCmds.put("reload", new Reload());
|
||||
@ -187,6 +188,7 @@ public class JailHandler {
|
||||
addCmds.put("teleout", new TeleOut());
|
||||
addCmds.put("teleportout", new TeleOut());
|
||||
addCmds.put("version", new Version());
|
||||
addCmds.put("ver", new Version());
|
||||
addCmds.put("v", new Version());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,22 @@ import com.graywolf336.jail.command.CommandInfo;
|
||||
)
|
||||
public class JailStopCommand implements Command {
|
||||
public boolean execute(JailManager jm, CommandSender sender, String... args) {
|
||||
boolean nothing = true;
|
||||
|
||||
if(jm.isCreatingACell(sender.getName())) {
|
||||
jm.removeCellCreationPlayer(sender.getName());
|
||||
sender.sendMessage(ChatColor.RED + "You have stopped creating cells.");
|
||||
nothing = false;
|
||||
}
|
||||
|
||||
if(jm.isCreatingAJail(sender.getName())) {
|
||||
jm.removeJailCreationPlayer(sender.getName());
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user