2014-02-01 01:24:44 -06:00
|
|
|
package com.graywolf336.jail.command.subcommands;
|
2013-12-05 18:22:15 -06:00
|
|
|
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
|
|
|
|
import com.graywolf336.jail.JailManager;
|
|
|
|
import com.graywolf336.jail.command.Command;
|
|
|
|
import com.graywolf336.jail.command.CommandInfo;
|
2014-01-23 18:51:22 -06:00
|
|
|
import com.graywolf336.jail.enums.LangString;
|
2013-12-05 18:22:15 -06:00
|
|
|
|
|
|
|
@CommandInfo(
|
|
|
|
maxArgs = 1,
|
|
|
|
minimumArgs = 0,
|
2014-01-21 18:09:47 -06:00
|
|
|
needsPlayer = false,
|
2014-02-01 01:24:44 -06:00
|
|
|
pattern = "check",
|
2013-12-05 18:22:15 -06:00
|
|
|
permission = "jail.command.jailcheck",
|
2014-02-01 01:24:44 -06:00
|
|
|
usage = "/jail check (Player name)"
|
2013-12-05 18:22:15 -06:00
|
|
|
)
|
|
|
|
public class JailCheckCommand implements Command{
|
|
|
|
|
|
|
|
// Checks the status of the specified prisoner, if no args, will display all players currently jailed
|
|
|
|
public boolean execute(JailManager jm, CommandSender sender, String... args) {
|
2014-01-23 18:51:22 -06:00
|
|
|
//No args means show everyone
|
2014-02-01 01:24:44 -06:00
|
|
|
if(args.length == 1) {
|
|
|
|
//TODO
|
2014-01-23 18:51:22 -06:00
|
|
|
}else {
|
|
|
|
//Otherwise let's check the first arg
|
2014-02-01 01:24:44 -06:00
|
|
|
if(jm.isPlayerJailed(args[1])) {
|
|
|
|
//TODO
|
2014-01-23 18:51:22 -06:00
|
|
|
}else {
|
2014-02-01 01:24:44 -06:00
|
|
|
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.NOTJAILED, args[1]));
|
2014-01-23 18:51:22 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
2013-12-05 18:22:15 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|