geforkt von Mirrors/FastAsyncWorldEdit
add DefaultAllowedDataCycleBlocks to prevent NPE
Dieser Commit ist enthalten in:
Ursprung
4511884bca
Commit
6bea77933f
@ -56,6 +56,7 @@ public abstract class LocalConfiguration {
|
||||
public boolean profile = false;
|
||||
public boolean traceUnflushedSessions = false;
|
||||
public Set<String> disallowedBlocks = new HashSet<>();
|
||||
public Set<String> defaultAllowedDataCycleBlocks = new HashSet<>();
|
||||
protected BlockMask disallowedBlocksMask;
|
||||
public int defaultChangeLimit = -1;
|
||||
public int maxChangeLimit = -1;
|
||||
@ -168,6 +169,10 @@ public abstract class LocalConfiguration {
|
||||
return blockTypes.stream().filter(Objects::nonNull).map(BlockType::getId).toArray(String[]::new);
|
||||
}
|
||||
|
||||
protected String[] getDefaultAllowedDataCycleBlocks() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the configuration.
|
||||
*/
|
||||
|
@ -91,7 +91,7 @@ public class PropertiesConfiguration extends LocalConfiguration {
|
||||
disallowedBlocks = getStringSet("disallowed-blocks", getDefaultDisallowedBlocks());
|
||||
disallowedBlocksMask = null;
|
||||
allowedDataCycleBlocks =
|
||||
new HashSet<>(getStringSet("limits.allowed-data-cycle-blocks", null));
|
||||
new HashSet<>(getStringSet("limits.allowed-data-cycle-blocks", getDefaultAllowedDataCycleBlocks()));
|
||||
defaultChangeLimit = getInt("default-max-changed-blocks", defaultChangeLimit);
|
||||
maxChangeLimit = getInt("max-changed-blocks", maxChangeLimit);
|
||||
defaultVerticalHeight = getInt("default-vertical-height", defaultVerticalHeight);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren