Reimplment automatically jailing in cells, fixes #42.
New config option if you want to disable this option.
This commit is contained in:
@ -146,8 +146,9 @@ public class JailCommand implements Command {
|
||||
}
|
||||
}
|
||||
|
||||
//If they want just any open cell, then let's find the first empty one
|
||||
if(params.isAnyCell()) {
|
||||
//If they want just any open cell or automatic jailing in cells is turned on
|
||||
//and a cell wasn't already found, then find try to find a cell
|
||||
if((params.isAnyCell() || jm.getPlugin().getConfig().getBoolean(Settings.AUTOMATICCELL.getPath(), true)) && c == null) {
|
||||
c = jm.getJail(jailName).getFirstEmptyCell();
|
||||
if(c == null) {
|
||||
//If there wasn't an empty cell, then tell them so.
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.graywolf336.jail.enums;
|
||||
|
||||
public enum Settings {
|
||||
AUTOMATICCELL("jailing.jail.automaticCell"),
|
||||
AUTOMATICMUTE("jailing.jail.automaticMute"),
|
||||
BROADCASTJAILING("jailing.jail.broadcastJailing"),
|
||||
BLOCKBREAKPENALTY("jailing.during.blockBreakPenalty"),
|
||||
|
Reference in New Issue
Block a user