mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Allow __global__ BUILD to be set to DENY.
This commit is contained in:
parent
a35aaf9659
commit
4597849466
@ -420,7 +420,8 @@ public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nulla
|
||||
} else if (flag == DefaultFlag.BUILD) {
|
||||
// Legacy behavior -> we can't let people change BUILD on
|
||||
// the global region
|
||||
return null;
|
||||
State value = region.getFlag(DefaultFlag.BUILD);
|
||||
return value != State.ALLOW ? (V) value : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1979,7 +1979,7 @@ public void testGetEffectiveFlagGlobalRegionBuildDeny() throws Exception {
|
||||
|
||||
FlagValueCalculator result = mock.getFlagCalculator();
|
||||
// Cannot let users override BUILD on GLOBAL
|
||||
assertThat(result.getEffectiveFlag(global, DefaultFlag.BUILD, null), equalTo(null));
|
||||
assertThat(result.getEffectiveFlag(global, DefaultFlag.BUILD, null), equalTo(State.DENY));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user