mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-26 02:57:42 +01:00
Handle null players in shim method of GlobalRegionManager.
This commit is contained in:
parent
cd62af698b
commit
bf8ef39871
@ -214,7 +214,9 @@ public boolean allows(StateFlag flag, Location location) {
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean allows(StateFlag flag, Location location, @Nullable LocalPlayer player) {
|
||||
if (player instanceof BukkitPlayer) {
|
||||
if (player == null) {
|
||||
return createQuery().testState(location, null, flag);
|
||||
} else if (player instanceof BukkitPlayer) {
|
||||
Player p = ((BukkitPlayer) player).getPlayer();
|
||||
return createQuery().testState(location, p, flag);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user