Meh, start a little work on the jailing command.

This commit is contained in:
graywolf336 2013-12-16 14:21:32 -06:00
parent c7a08381f2
commit 913c5d014e
2 changed files with 34 additions and 24 deletions

View File

@ -1,23 +1,33 @@
package com.graywolf336.jail.command.commands; package com.graywolf336.jail.command.commands;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.graywolf336.jail.JailManager;
import com.graywolf336.jail.command.Command; import com.graywolf336.jail.JailManager;
import com.graywolf336.jail.command.CommandInfo; import com.graywolf336.jail.command.Command;
import com.graywolf336.jail.command.CommandInfo;
@CommandInfo(
maxArgs = -1, @CommandInfo(
minimumArgs = 1, maxArgs = -1,
needsPlayer = false, minimumArgs = 1,
pattern = "jail|j", needsPlayer = false,
permission = "jail.command.jail", pattern = "jail|j",
usage = "/jail [name] (time) (j:Jail name) (c:Cell name) (r:Reason) (m:Muted)" permission = "jail.command.jail",
) usage = "/jail [p:name] (t:time) (j:Jail name) (c:Cell name) (r:Reason) (m:Muted)"
public class JailCommand implements Command { )
public class JailCommand implements Command {
public boolean execute(JailManager jm, CommandSender sender, String... args) {
return true; //If they made it this far, the command is intact and ready to be processed. :) public boolean execute(JailManager jm, CommandSender sender, String... args) {
} Player p = jm.getPlugin().getServer().getPlayer(args[0]);
} //Player is not online
if(p == null) {
sender.sendMessage(args[0] + " is offline.");
}else {
//Player *is* online
sender.sendMessage(args[0] + " is online.");
}
return true;
}
}

View File

@ -15,7 +15,7 @@ commands:
description: Remove existing jail zone description: Remove existing jail zone
jail: jail:
description: Jail specified player for specified amount of time. description: Jail specified player for specified amount of time.
usage: /jail [player name] (time) (jail name):(cell name) (reason) usage: /jail [p:player] (t:time) (j:jail) (c:cell) (r:reason) (m:muted)
unjail: unjail:
description: Release a player from jail. description: Release a player from jail.
unjailforce: unjailforce: