public static bool IsRestrictedForUser(Player player, Region region, Node node)
        {
            if (UsingPermissions)
            {
                var Allowed = Program.permissionManager.IsPermittedImpl(node.Path, player);

                if (!Allowed)
                    return region.IsRestrictedForUser(player);

                return !Allowed;
            }

            return region.IsRestrictedForUser(player);
        }
        protected override void Initialized(object state)
        {
            if (!Directory.Exists(RegionsFolder))
                Directory.CreateDirectory(RegionsFolder);

            rProperties = new Properties(RegionsFolder + Path.DirectorySeparatorChar + "regions.properties");
            rProperties.Load();

            rProperties.AddHeaderLine("Use 'rectify=false' to ignore world alterations from");
            rProperties.AddHeaderLine("players who are blocked; Possibly saving bandwidth.");

            rProperties.pushData();
            rProperties.Save(false);

            if (rProperties.RectifyChanges)
                WorldAlter = HookResult.RECTIFY;

            SelectorItem = rProperties.SelectionToolID;

            regionManager = new RegionManager(DataFolder);

            selection = new Selection();

            commands = new Commands();
            commands.regionManager = regionManager;
            commands.RegionsPlugin = this;
            commands.selection = selection;

            commands.Node_Create        = Node.FromPath("region.create");
            commands.Node_Here          = Node.FromPath("region.here");
            commands.Node_List          = Node.FromPath("region.list");
            commands.Node_Npcres        = Node.FromPath("region.npcres");
            commands.Node_Opres         = Node.FromPath("region.opres");
            commands.Node_Projectile    = Node.FromPath("region.projectile");
            commands.Node_ProtectAll    = Node.FromPath("region.protectall");
            commands.Node_Select        = Node.FromPath("region.select");
            commands.Node_User          = Node.FromPath("region.user");

            AddCommand("region")
                .WithAccessLevel(AccessLevel.OP)
                .WithHelpText("Usage:    region [select, create, user, list, npcres, opres]")
                .WithDescription("Region Management.")
                .WithPermissionNode("regions")
                .Calls(commands.Region);

            AddCommand("regions")
                .WithAccessLevel(AccessLevel.OP)
                .WithHelpText("Usage:    regions [select, create, user, list, npcres, opres]")
                .WithDescription("Region Management.")
                .WithPermissionNode("regions") //Need another method to split the commands up.
                .Calls(commands.Region);

            ChestBreak      = AddAndCreateNode("region.chestbreak");
            ChestOpen       = AddAndCreateNode("region.chestopen");
            DoorChange      = AddAndCreateNode("region.doorchange");
            LiquidFlow      = AddAndCreateNode("region.liquidflow");
            ProjectileUse   = AddAndCreateNode("region.projectileuse");
            SignEdit        = AddAndCreateNode("region.signedit");
            TileBreak       = AddAndCreateNode("region.tilebreak");
            TilePlace       = AddAndCreateNode("region.tileplace");
        }
        public static bool IsRestricted(Node node, Player player)
        {
            if (IsRunningPermissions())
            {
                var isPermitted = Program.permissionManager.IsPermittedImpl(node.Path, player);
                var isOp = player.Op;

                return !isPermitted && !isOp;
            }

            return !player.Op;
        }
 public bool isPermitted(Node node, Player player)
 {
     return false;
 }
 /// <summary>
 /// Permission check function.  Use this to check player permissions.
 /// </summary>
 /// <param name="node">Permission node to check</param>
 /// <param name="player">Player to check for permission node</param>
 /// <returns>True if player is permitted.  False if not.</returns>
 public bool IsPermitted(Node node, Player player)
 {
     return IsPermittedImpl(node.Path, player);
 }
        public bool IsRestrictedForUser(Player player, Region region, Node node)
        {
            if (UsingPermissions)
            {
                return Program.permissionManager.isPermittedImpl(node.Path, player);
            }

            return region.IsRestrictedForUser(player);
        }
        protected override void Enabled()
        {
            DoorChange      = Node.FromPath("regions.doorchange");
            LiquidFlow      = Node.FromPath("regions.liquidflow");
            TileBreak       = Node.FromPath("regions.tilebreak");
            TilePlace       = Node.FromPath("regions.tileplace");
            ProjectileUse   = Node.FromPath("regions.projectileuse");

            ProgramLog.Plugin.Log("Regions for TDSM #{0} enabled.", base.TDSMBuild);
        }
 /* If a Permissions Handler is found, It checks if they are permitted, Else they are not (false). */
 public bool IsRestrictedForUser(Player player, Node node)
 {
     return (IsRunningPermissions()) ? Program.permissionManager.IsPermittedImpl(node.Path, player) : false;
 }