Don't allow jailing of players who are already jailed.
This commit is contained in:
parent
3ab161cbe8
commit
539ebeb326
@ -35,6 +35,7 @@ public class JailCommand implements Command {
|
|||||||
*
|
*
|
||||||
* - If there are any jails.
|
* - If there are any jails.
|
||||||
* - If the command can be parsed correctly.
|
* - If the command can be parsed correctly.
|
||||||
|
* - If the player is already jailed.
|
||||||
* - If the given time can be parsed correctly, defaults to what is defined in the config
|
* - If the given time can be parsed correctly, defaults to what is defined in the config
|
||||||
* - If the jail is reasonable or not, else sets the one from the config
|
* - If the jail is reasonable or not, else sets the one from the config
|
||||||
* - If the cell is not empty then checks to be sure that cell exists
|
* - If the cell is not empty then checks to be sure that cell exists
|
||||||
@ -56,6 +57,12 @@ public class JailCommand implements Command {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Check if the given player is already jailed or not
|
||||||
|
if(jm.isPlayerJailed(params.player())) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "That player is already jailed.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//Try to parse the time, if they give us nothing in the time parameter then we get the default time
|
//Try to parse the time, if they give us nothing in the time parameter then we get the default time
|
||||||
//from the config and if that isn't there then we default to thirty minutes.
|
//from the config and if that isn't there then we default to thirty minutes.
|
||||||
Long time = 10L;
|
Long time = 10L;
|
||||||
|
Loading…
Reference in New Issue
Block a user