mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-06 20:38:08 +02:00
Swap the if() in the state flag test to make it more readable.
This commit is contained in:
parent
8a11752253
commit
c0d4ba5c6c
@ -284,15 +284,18 @@ private State calculateState(StateFlag flag, @Nullable LocalPlayer player, @Null
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regionsThatCountExistHere) {
|
if (player != null) {
|
||||||
if (player != null) {
|
State fallback;
|
||||||
State membership = allowOrNone(needsClear.isEmpty());
|
|
||||||
return combine(state, membership);
|
if (regionsThatCountExistHere) {
|
||||||
|
fallback = allowOrNone(needsClear.isEmpty());
|
||||||
} else {
|
} else {
|
||||||
return combine(state, getDefault(flag, null));
|
fallback = getDefault(flag, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return combine(state, fallback);
|
||||||
} else {
|
} else {
|
||||||
return combine(getDefault(flag, player));
|
return combine(state, getDefault(flag, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user