Meh, start a little work on the jailing command.
This commit is contained in:
parent
c7a08381f2
commit
913c5d014e
@ -1,6 +1,7 @@
|
|||||||
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.JailManager;
|
||||||
import com.graywolf336.jail.command.Command;
|
import com.graywolf336.jail.command.Command;
|
||||||
@ -12,12 +13,21 @@ import com.graywolf336.jail.command.CommandInfo;
|
|||||||
needsPlayer = false,
|
needsPlayer = false,
|
||||||
pattern = "jail|j",
|
pattern = "jail|j",
|
||||||
permission = "jail.command.jail",
|
permission = "jail.command.jail",
|
||||||
usage = "/jail [name] (time) (j:Jail name) (c:Cell name) (r:Reason) (m:Muted)"
|
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) {
|
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. :)
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user