mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-03 01:19:42 +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) {
|
while (current != null) {
|
||||||
V value = current.getFlag(flag);
|
V value = current.getFlag(flag);
|
||||||
|
|
||||||
|
if (value != null) {
|
||||||
boolean use = true;
|
boolean use = true;
|
||||||
|
|
||||||
if (flag.getRegionGroupFlag() != null) {
|
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;
|
return value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
current = current.getParent();
|
current = current.getParent();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user