Ejemplo n.º 1
0
        void CreateZone(Player p, string[] args, CommandData data, int offset)
        {
            if (p.level.FindZoneExact(args[offset]) != null)
            {
                p.Message("A zone with that name already exists. Use &T/zedit &Sto change it.");
                return;
            }
            if (!LevelInfo.Check(p, data.Rank, p.level, "create zones in this level"))
            {
                return;
            }

            Zone z = new Zone();

            // TODO readd once performance issues with massive zone build blacklists are fixed
            //z.Access.CloneAccess(p.level.BuildAccess);
            z.Config.Name = args[offset];
            if (!PermissionCmd.Do(p, args, offset + 1, false, z.Access, data, p.level))
            {
                return;
            }

            p.Message("Creating zone " + z.ColoredName);
            if (!p.Ignores.DrawOutput || !p.Supports(CpeExt.MessageTypes))
            {
                p.Message("Place or break two blocks to determine the edges.");
            }
            p.MakeSelection(2, "Selecting region for &SNew zone", z, AddZone);
        }
Ejemplo n.º 2
0
 void EditZone(Player p, string[] args, Zone zone)
 {
     if (!PermissionCmd.Do(p, args, 2, false, zone.Access))
     {
         return;
     }
     p.level.Save(true);
 }
Ejemplo n.º 3
0
        void CreateZone(Player p, string[] args, int offset)
        {
            if (p.level.FindZoneExact(args[offset]) != null)
            {
                Player.Message(p, "A zone with that name already exists. Use %T/zedit %Sto change it.");
                return;
            }

            Zone z = new Zone(p.level);

            z.Config.Name = args[offset];
            if (!PermissionCmd.Do(p, args, offset + 1, false, z.Access))
            {
                return;
            }

            Player.Message(p, "Creating zone " + z.ColoredName);
            Player.Message(p, "Place or break two blocks to determine the edges.");
            p.MakeSelection(2, z, AddZone);
        }
Ejemplo n.º 4
0
        void CreateZone(Player p, string[] args, CommandData data, int offset)
        {
            if (p.level.FindZoneExact(args[offset]) != null)
            {
                p.Message("A zone with that name already exists. Use %T/zedit %Sto change it.");
                return;
            }
            if (!LevelInfo.Check(p, data.Rank, p.level, "create zones in this level"))
            {
                return;
            }

            Zone z = new Zone();

            z.Config.Name = args[offset];
            if (!PermissionCmd.Do(p, args, offset + 1, false, z.Access, data, p.level))
            {
                return;
            }

            p.Message("Creating zone " + z.ColoredName);
            p.Message("Place or break two blocks to determine the edges.");
            p.MakeSelection(2, "Selecting region for %SNew zone", z, AddZone);
        }
Ejemplo n.º 5
0
 void EditZone(Player p, string[] args, CommandData data, Zone zone)
 {
     PermissionCmd.Do(p, args, 2, false, zone.Access, data, p.level);
 }