Jail check is now for one player only, use jail list <jail> for all.
This commit is contained in:
parent
94111955a4
commit
b1ca15d10c
@ -1,35 +1,36 @@
|
||||
package com.graywolf336.jail.command.subcommands;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.graywolf336.jail.JailManager;
|
||||
import com.graywolf336.jail.beans.Prisoner;
|
||||
import com.graywolf336.jail.command.Command;
|
||||
import com.graywolf336.jail.command.CommandInfo;
|
||||
import com.graywolf336.jail.enums.LangString;
|
||||
|
||||
@CommandInfo(
|
||||
maxArgs = 1,
|
||||
minimumArgs = 0,
|
||||
minimumArgs = 1,
|
||||
needsPlayer = false,
|
||||
pattern = "check",
|
||||
permission = "jail.command.jailcheck",
|
||||
usage = "/jail check (Player name)"
|
||||
usage = "/jail check <playername>"
|
||||
)
|
||||
public class JailCheckCommand implements Command{
|
||||
|
||||
// Checks the status of the specified prisoner, if no args, will display all players currently jailed
|
||||
// Checks the status of the specified prisoner
|
||||
public boolean execute(JailManager jm, CommandSender sender, String... args) {
|
||||
//No args means show everyone
|
||||
if(args.length == 1) {
|
||||
//TODO
|
||||
}else {
|
||||
//Otherwise let's check the first arg
|
||||
//Otherwise let's check the first argument
|
||||
if(jm.isPlayerJailed(args[1])) {
|
||||
//TODO
|
||||
Prisoner p = jm.getPrisoner(args[1]);
|
||||
|
||||
//graywolf663: Being gray's evil twin; CONSOLE (10)
|
||||
//prisoner: reason; jailer (time in minutes)
|
||||
sender.sendMessage(ChatColor.BLUE + " " + p.getName() + ": " + p.getReason() + "; " + p.getJailer() + " (" + p.getRemainingTimeInMinutes() + " mins)");
|
||||
}else {
|
||||
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.NOTJAILED, args[1]));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user