Don't check region group if the flag value is null.

This commit is contained in:
sk89q 2014-08-18 02:32:05 -07:00
parent 0f10e89f7c
commit 095f2aa67e

View File

@ -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();
} }