Don't check bypass for offline players.

This is someone else's problem now (╯°□°)╯︵ ┻━┻
This commit is contained in:
wizjany 2022-01-01 20:08:16 -05:00
parent 98bef4e0ab
commit 46251f5ffa
No known key found for this signature in database
GPG Key ID: 1DB5861C03B76B5E

View File

@ -83,8 +83,12 @@ public void run() {
public boolean hasBypass(LocalPlayer player, World world) { public boolean hasBypass(LocalPlayer player, World world) {
if (player instanceof BukkitPlayer) { if (player instanceof BukkitPlayer) {
if (((BukkitPlayer) player).getPlayer().hasMetadata("NPC") if (((BukkitPlayer) player).getPlayer().hasMetadata("NPC")
&& WorldGuard.getInstance().getPlatform().getGlobalStateManager().get(world).fakePlayerBuildOverride) && WorldGuard.getInstance().getPlatform().getGlobalStateManager().get(world).fakePlayerBuildOverride) {
return true; return true;
}
if (!((BukkitPlayer) player).getPlayer().isOnline()) {
return false;
}
} }
return super.hasBypass(player, world); return super.hasBypass(player, world);
} }