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;
import org.bukkit.command.CommandSender;
import com.graywolf336.jail.JailManager;
import com.graywolf336.jail.command.Command;
import com.graywolf336.jail.command.CommandInfo;
@CommandInfo(
maxArgs = -1,
minimumArgs = 1,
needsPlayer = false,
pattern = "jail|j",
permission = "jail.command.jail",
usage = "/jail [name] (time) (j:Jail name) (c:Cell name) (r:Reason) (m:Muted)"
)
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. :)
}
}
package com.graywolf336.jail.command.commands;
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.command.CommandInfo;
@CommandInfo(
maxArgs = -1,
minimumArgs = 1,
needsPlayer = false,
pattern = "jail|j",
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 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
jail:
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:
description: Release a player from jail.
unjailforce: