Skip to content

Commit

Permalink
Allow NPCs to bypass region protections.
Browse files Browse the repository at this point in the history
  • Loading branch information
wizjany committed Jan 25, 2019
1 parent 3f7a9f9 commit d77d23f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.