mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-27 01:34:13 +00:00
Make NPCs bypass all flags, closes #41
This commit is contained in:
parent
99a96a3c77
commit
592ef42741
1 changed files with 5 additions and 0 deletions
|
@ -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()))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue