Fixes a bug when calling jail with the jail prefix

This commit is contained in:
Kristian Knarvik 2022-03-11 12:10:42 +01:00
parent 14df4f6d39
commit eb0c3ba46c
4 changed files with 7 additions and 5 deletions

View File

@ -74,7 +74,7 @@ public class Update {
// Parse the current build number to a number
long curr = Long.parseLong(ver[ver.length - 1]);
plugin.debug(number + " verus " + curr);
plugin.debug(number + " versus " + curr);
// Check if the build on the CI server is higher than the one we're running
needed = number > curr;
@ -100,7 +100,7 @@ public class Update {
// 3.0.0-SNAPSHOT-b0
String currentVer = plugin.getDescription().getVersion().split("-")[0];
plugin.debug(remoteVer + " verus " + currentVer);
plugin.debug(remoteVer + " versus " + currentVer);
this.needed = this.versionCompare(remoteVer, currentVer) > 0;
if (needed) {

View File

@ -36,6 +36,7 @@ import java.util.List;
usage = "/jail [name] (-t time) (-j JailName) (-c CellName) (-a AnyCell) (-m Muted) (-r A reason for jailing)"
)
public class JailCommand implements Command {
private static final String noJailPermission = "jail.cantbejailed";
private final List<String> commands = Arrays.asList("p", "t", "i", "j", "c", "a", "m", "r", "f");
@ -64,6 +65,7 @@ public class JailCommand implements Command {
if (!arguments.contains("-p")) {
arguments.add(0, "-p");
}
arguments.removeIf(String::isEmpty);
Jailing params;

View File

@ -20,10 +20,10 @@ jailing:
during:
blockBreakPenalty: 5m
blockBreakProtection: true
blockBreakWhiteList: [ 'wheat', 'carrot', 'potato' ] # these blocks can be broken at any time by prisoners
blockBreakWhiteList: [ 'wheat', 'carrot', 'potato', 'beetroot', 'glow_berries' ] # these blocks can be broken at any time by prisoners
blockPlacePenalty: 5m
blockPlaceProtection: true
blockPlaceWhiteList: [ 'wheat', 'carrot', 'potato' ] # these blocks can be placed at any time by prisoners
blockPlaceWhiteList: [ 'wheat', 'carrot', 'potato', 'beetroot', 'glow_berries' ] # these blocks can be placed at any time by prisoners
cellsign:
- '%player%'
- '%prettytime%'

View File

@ -6,7 +6,7 @@ authors: [ graywolf336 ]
website: dev.bukkit.org/server-mods/jail/
softdepend: [ WorldEdit, Vault, Multiverse-Core ]
load: POSTWORLD
api-version: 1.17
api-version: 1.18
commands:
jail: