mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Sponge stuff
Added entity / mob / vehicle / animal / monster caps + entity clearing on plot clear.
This commit is contained in:
		@@ -92,7 +92,14 @@ public class DebugExec extends SubCommand {
 | 
			
		||||
        File file = new File(PS.get().IMP.getDirectory(), "scripts" + File.separator + "start.js");
 | 
			
		||||
        if (file.exists()) {
 | 
			
		||||
            init();
 | 
			
		||||
            onCommand(ConsolePlayer.getConsole(), new String[] {"run", "start.js"});
 | 
			
		||||
            try {
 | 
			
		||||
                String script = StringMan.join(Files.readLines(new File(new File(PS.get().IMP.getDirectory() + File.separator + "scripts"), "start.js"), StandardCharsets.UTF_8), System.getProperty("line.separator"));
 | 
			
		||||
                scope.put("THIS", this);
 | 
			
		||||
                scope.put("PlotPlayer", ConsolePlayer.getConsole());
 | 
			
		||||
                engine.eval(script, scope);
 | 
			
		||||
            } catch (Exception e) {
 | 
			
		||||
                e.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
@@ -148,7 +155,7 @@ public class DebugExec extends SubCommand {
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onCommand(final PlotPlayer player, String[] args) {
 | 
			
		||||
    public boolean onCommand(final PlotPlayer player, String... args) {
 | 
			
		||||
        final List<String> allowed_params = Arrays.asList("calibrate-analysis", "remove-flag", "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check");
 | 
			
		||||
        if (args.length > 0) {
 | 
			
		||||
            final String arg = args[0].toLowerCase();
 | 
			
		||||
 
 | 
			
		||||
@@ -86,7 +86,7 @@ public class list extends SubCommand {
 | 
			
		||||
        if (Permissions.hasPermission(player, "plots.list.top")) {
 | 
			
		||||
            args.add("top");
 | 
			
		||||
        }
 | 
			
		||||
        if (Permissions.hasPermission(player, "plots.list..all")) {
 | 
			
		||||
        if (Permissions.hasPermission(player, "plots.list.all")) {
 | 
			
		||||
            args.add("all");
 | 
			
		||||
        }
 | 
			
		||||
        if (Permissions.hasPermission(player, "plots.list.unowned")) {
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@ public enum Permissions {
 | 
			
		||||
        if ((player == null) || player.hasPermission(ADMIN.s) || player.hasPermission(STAR.s)) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        if (Permissions.hasPermission(player, perm)) {
 | 
			
		||||
        if (player.hasPermission(perm)) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        final String[] nodes = perm.split("\\.");
 | 
			
		||||
@@ -67,11 +67,11 @@ public enum Permissions {
 | 
			
		||||
        if ((player == null) || player.hasPermission(ADMIN.s) || player.hasPermission(STAR.s)) {
 | 
			
		||||
            return Integer.MAX_VALUE;
 | 
			
		||||
        }
 | 
			
		||||
        if (Permissions.hasPermission(player, stub + ".*")) {
 | 
			
		||||
        if (player.hasPermission(stub + ".*")) {
 | 
			
		||||
            return Integer.MAX_VALUE;
 | 
			
		||||
        }
 | 
			
		||||
        for (int i = range; i > 0; i--) {
 | 
			
		||||
            if (Permissions.hasPermission(player, stub + "." + i)) {
 | 
			
		||||
            if (player.hasPermission(stub + "." + i)) {
 | 
			
		||||
                return i;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user