Add config option to deny region bypass by default
This commit is contained in:
parent
8dee2ad3b8
commit
af67f1dd6a
|
@ -280,6 +280,7 @@ public class BukkitWorldConfiguration extends YamlWorldConfiguration {
|
|||
maxClaimVolume = getInt("regions.max-claim-volume", 30000);
|
||||
claimOnlyInsideExistingRegions = getBoolean("regions.claim-only-inside-existing-regions", false);
|
||||
boundedLocationFlags = getBoolean("regions.location-flags-only-inside-regions", false);
|
||||
disableDefaultBypass = getBoolean("regions.disable-default-bypass", false);
|
||||
|
||||
maxRegionCountPerPlayer = getInt("regions.max-region-count-per-player.default", 7);
|
||||
maxRegionCounts = new HashMap<>();
|
||||
|
|
|
@ -174,6 +174,7 @@ public abstract class WorldConfiguration {
|
|||
public boolean ignoreHopperMoveEvents;
|
||||
public boolean breakDeniedHoppers;
|
||||
public boolean useMaxPriorityAssociation;
|
||||
public boolean disableDefaultBypass;
|
||||
protected Map<String, Integer> maxRegionCounts;
|
||||
|
||||
/**
|
||||
|
|
|
@ -103,6 +103,8 @@ public class Session {
|
|||
|
||||
lastValid = location;
|
||||
lastRegionSet = set.getRegions();
|
||||
disableBypass = WorldGuard.getInstance().getPlatform().getGlobalStateManager()
|
||||
.get(player.getWorld()).disableDefaultBypass;
|
||||
|
||||
for (Handler handler : handlers.values()) {
|
||||
handler.initialize(player, location, set);
|
||||
|
|
Loading…
Reference in New Issue