mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 19:54:43 +02:00
@ -122,11 +122,6 @@ public interface IPlotMain {
|
||||
*/
|
||||
boolean initWorldEdit();
|
||||
|
||||
/**
|
||||
* Register TNT related events (if TNT protection is enabled)
|
||||
*/
|
||||
void registerTNTListener();
|
||||
|
||||
/**
|
||||
* Get the economy provider
|
||||
* @return
|
||||
|
@ -191,9 +191,6 @@ public class PS {
|
||||
log("&dUsing metrics will allow us to improve the plugin, please consider it :)");
|
||||
}
|
||||
IMP.startMetrics();
|
||||
if (Settings.TNT_LISTENER) {
|
||||
IMP.registerTNTListener();
|
||||
}
|
||||
if (Settings.CHUNK_PROCESSOR) {
|
||||
IMP.registerChunkProcessor();
|
||||
}
|
||||
@ -1754,7 +1751,6 @@ public class PS {
|
||||
// Protection
|
||||
options.put("protection.redstone.disable-offline", Settings.REDSTONE_DISABLER);
|
||||
options.put("protection.redstone.disable-unoccupied", Settings.REDSTONE_DISABLER_UNOCCUPIED);
|
||||
options.put("protection.tnt-listener.enabled", Settings.TNT_LISTENER);
|
||||
options.put("protection.piston.falling-blocks", Settings.PISTON_FALLING_BLOCK_CHECK);
|
||||
|
||||
// Clusters
|
||||
@ -1885,7 +1881,6 @@ public class PS {
|
||||
Settings.REDSTONE_DISABLER = config.getBoolean("protection.redstone.disable-offline");
|
||||
Settings.REDSTONE_DISABLER_UNOCCUPIED = config.getBoolean("protection.redstone.disable-unoccupied");
|
||||
|
||||
Settings.TNT_LISTENER = config.getBoolean("protection.tnt-listener.enabled");
|
||||
Settings.PISTON_FALLING_BLOCK_CHECK = config.getBoolean("protection.piston.falling-blocks");
|
||||
|
||||
// Clusters
|
||||
|
@ -50,7 +50,7 @@ public class Alias extends SetCommand {
|
||||
MainUtil.sendMessage(plr, C.ALIAS_TOO_LONG);
|
||||
return false;
|
||||
}
|
||||
if (!StringMan.isAlphanumericUnd(alias)) {
|
||||
if (alias.contains(" ") || !StringMan.isAsciiPrintable(alias)) {
|
||||
C.NOT_VALID_VALUE.send(plr);
|
||||
return false;
|
||||
}
|
||||
|
@ -164,28 +164,12 @@ public class list extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
plots = new ArrayList<>();
|
||||
String match;
|
||||
if (args.length == 2) {
|
||||
match = args[1];
|
||||
} else {
|
||||
match = null;
|
||||
}
|
||||
for (final Plot plot : PS.get().getPlots()) {
|
||||
final Flag flag = plot.getFlags().get("done");
|
||||
if (flag == null) {
|
||||
continue;
|
||||
}
|
||||
if (match != null) {
|
||||
try {
|
||||
if (flag.getValueString().matches(match)) {
|
||||
plots.add(plot);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
plots.add(plot);
|
||||
}
|
||||
plots.add(plot);
|
||||
}
|
||||
Collections.sort(plots, new Comparator<Plot>() {
|
||||
@Override
|
||||
|
@ -78,10 +78,6 @@ public class Settings {
|
||||
public static boolean CHUNK_PROCESSOR_TRIM_ON_SAVE = false;
|
||||
public static boolean CHUNK_PROCESSOR_GC = false;
|
||||
public static int CHUNK_PROCESSOR_MAX_BLOCKSTATES = 4096;
|
||||
public static int CHUNK_PROCESSOR_MAX_ENTITIES = 512;
|
||||
public static boolean CHUNK_PROCESSOR_DISABLE_PHYSICS = false;
|
||||
/**
|
||||
* TNT listener
|
||||
public static int CHUNK_PROCESSOR_MAX_ENTITIES = 512;
|
||||
public static boolean CHUNK_PROCESSOR_DISABLE_PHYSICS = false;
|
||||
/**
|
||||
|
@ -14,9 +14,6 @@ public class Permissions {
|
||||
}
|
||||
|
||||
public static boolean hasPermission(final CommandCaller player, String perm) {
|
||||
if ((player == null) || player.hasPermission(C.PERMISSION_ADMIN.s()) || player.hasPermission(C.PERMISSION_STAR.s())) {
|
||||
return true;
|
||||
}
|
||||
if (player.hasPermission(perm)) {
|
||||
return true;
|
||||
}
|
||||
@ -45,8 +42,15 @@ public class Permissions {
|
||||
}
|
||||
|
||||
public static int hasPermissionRange(final PlotPlayer player, final String stub, final int range) {
|
||||
if ((player == null) || player.hasPermission(C.PERMISSION_ADMIN.s()) || player.hasPermission(C.PERMISSION_STAR.s())) {
|
||||
return Integer.MAX_VALUE;
|
||||
final String[] nodes = stub.split("\\.");
|
||||
final StringBuilder n = new StringBuilder();
|
||||
for (int i = 0; i < (nodes.length - 1); i++) {
|
||||
n.append(nodes[i] + ("."));
|
||||
if (!stub.equals(n + C.PERMISSION_STAR.s())) {
|
||||
if (player.hasPermission(n + C.PERMISSION_STAR.s())) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (player.hasPermission(stub + ".*")) {
|
||||
return Integer.MAX_VALUE;
|
||||
|
Reference in New Issue
Block a user