Add the jailstop, jailtelein, and jailteleout to subcommands.

This commit is contained in:
graywolf336
2014-01-30 14:10:51 -06:00
parent edb563a9ec
commit 1e632017c7
8 changed files with 78 additions and 20 deletions

View File

@@ -0,0 +1,32 @@
package com.graywolf336.jail.command.subcommands;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import com.graywolf336.jail.JailManager;
import com.graywolf336.jail.command.Command;
import com.graywolf336.jail.command.CommandInfo;
@CommandInfo(
maxArgs = 0,
minimumArgs = 0,
needsPlayer = true,
pattern = "stop|s",
permission = "jail.command.jailstop",
usage = "/jail stop"
)
public class JailStopCommand implements Command {
public boolean execute(JailManager jm, CommandSender sender, String... args) {
if(jm.isCreatingACell(sender.getName())) {
jm.removeCellCreationPlayer(sender.getName());
sender.sendMessage(ChatColor.RED + "You have stopped creating cells.");
}
if(jm.isCreatingAJail(sender.getName())) {
jm.removeJailCreationPlayer(sender.getName());
sender.sendMessage(ChatColor.RED + "You have stopped creating a jail.");
}
return true;
}
}