Fixes a bug when calling jail with the jail prefix
This commit is contained in:
		@@ -74,7 +74,7 @@ public class Update {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                // Parse the current build number to a number
 | 
					                // Parse the current build number to a number
 | 
				
			||||||
                long curr = Long.parseLong(ver[ver.length - 1]);
 | 
					                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
 | 
					                // Check if the build on the CI server is higher than the one we're running
 | 
				
			||||||
                needed = number > curr;
 | 
					                needed = number > curr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -100,7 +100,7 @@ public class Update {
 | 
				
			|||||||
                    // 3.0.0-SNAPSHOT-b0
 | 
					                    // 3.0.0-SNAPSHOT-b0
 | 
				
			||||||
                    String currentVer = plugin.getDescription().getVersion().split("-")[0];
 | 
					                    String currentVer = plugin.getDescription().getVersion().split("-")[0];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    plugin.debug(remoteVer + " verus " + currentVer);
 | 
					                    plugin.debug(remoteVer + " versus " + currentVer);
 | 
				
			||||||
                    this.needed = this.versionCompare(remoteVer, currentVer) > 0;
 | 
					                    this.needed = this.versionCompare(remoteVer, currentVer) > 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (needed) {
 | 
					                    if (needed) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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)"
 | 
					        usage = "/jail [name] (-t time) (-j JailName) (-c CellName) (-a AnyCell) (-m Muted) (-r A reason for jailing)"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
public class JailCommand implements Command {
 | 
					public class JailCommand implements Command {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static final String noJailPermission = "jail.cantbejailed";
 | 
					    private static final String noJailPermission = "jail.cantbejailed";
 | 
				
			||||||
    private final List<String> commands = Arrays.asList("p", "t", "i", "j", "c", "a", "m", "r", "f");
 | 
					    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")) {
 | 
					        if (!arguments.contains("-p")) {
 | 
				
			||||||
            arguments.add(0, "-p");
 | 
					            arguments.add(0, "-p");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        arguments.removeIf(String::isEmpty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Jailing params;
 | 
					        Jailing params;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,10 +20,10 @@ jailing:
 | 
				
			|||||||
  during:
 | 
					  during:
 | 
				
			||||||
    blockBreakPenalty: 5m
 | 
					    blockBreakPenalty: 5m
 | 
				
			||||||
    blockBreakProtection: true
 | 
					    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
 | 
					    blockPlacePenalty: 5m
 | 
				
			||||||
    blockPlaceProtection: true
 | 
					    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:
 | 
					    cellsign:
 | 
				
			||||||
      - '%player%'
 | 
					      - '%player%'
 | 
				
			||||||
      - '%prettytime%'
 | 
					      - '%prettytime%'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@ authors: [ graywolf336 ]
 | 
				
			|||||||
website: dev.bukkit.org/server-mods/jail/
 | 
					website: dev.bukkit.org/server-mods/jail/
 | 
				
			||||||
softdepend: [ WorldEdit, Vault, Multiverse-Core ]
 | 
					softdepend: [ WorldEdit, Vault, Multiverse-Core ]
 | 
				
			||||||
load: POSTWORLD
 | 
					load: POSTWORLD
 | 
				
			||||||
api-version: 1.17
 | 
					api-version: 1.18
 | 
				
			||||||
 | 
					
 | 
				
			||||||
commands:
 | 
					commands:
 | 
				
			||||||
  jail:
 | 
					  jail:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user