mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-12 11:21:34 +01:00
Don't check region group if the flag value is null.
This commit is contained in:
parent
0f10e89f7c
commit
095f2aa67e
@ -390,6 +390,8 @@ public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nulla
|
||||
|
||||
while (current != null) {
|
||||
V value = current.getFlag(flag);
|
||||
|
||||
if (value != null) {
|
||||
boolean use = true;
|
||||
|
||||
if (flag.getRegionGroupFlag() != null) {
|
||||
@ -405,9 +407,10 @@ public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nulla
|
||||
}
|
||||
}
|
||||
|
||||
if (use && value != null) {
|
||||
if (use) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
current = current.getParent();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user