Make NPCs bypass all flags, closes #41

This commit is contained in:
isokissa3 2018-12-11 02:50:28 +02:00
parent 99a96a3c77
commit 592ef42741

View file

@ -38,6 +38,11 @@ public class WorldGuardUtils
public static boolean hasBypass(Player player, World world, ProtectedRegion region, Flag<?> flag)
{
if (player.hasMetadata("NPC"))
{
return true;
}
//Permission system that supports wildcars is really helpful here :)
if (player.hasPermission("worldguard.region.bypass." + world.getName() + "." + region.getId() + "." + flag.getName()))
{