Permalink
Browse files

Allow NPCs to bypass region protections.

  • Loading branch information...
wizjany committed Jan 25, 2019
1 parent 3f7a9f9 commit d77d23f12aa3b9f6c1d01f4e6568f1d583b07296
@@ -65,4 +65,11 @@ public void run() {
get(new BukkitPlayer(WorldGuardPlugin.inst(), player)).tick(new BukkitPlayer(WorldGuardPlugin.inst(), player));
}
}

@Override
public boolean hasBypass(LocalPlayer player, World world) {
if (player instanceof BukkitPlayer && ((BukkitPlayer) player).hasMetadata("NPC"))
return true;
return base.hasBypass(player, world);
}
}

0 comments on commit d77d23f

Please sign in to comment.