mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-04 07:27:37 +01:00
Fallback to the global region for flags other than StateFlags. Thanks imjake9.
This commit is contained in:
parent
2b56247e21
commit
61a60ecdd6
@ -347,6 +347,10 @@ public <T extends Flag<V>, V> V getFlag(T flag) {
|
|||||||
try {
|
try {
|
||||||
return needsClear.values().iterator().next();
|
return needsClear.values().iterator().next();
|
||||||
} catch (NoSuchElementException e) {
|
} catch (NoSuchElementException e) {
|
||||||
|
if (globalRegion != null) {
|
||||||
|
V gFlag = globalRegion.getFlag(flag);
|
||||||
|
if (gFlag != null) return gFlag;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user