Example #1
0
        private static void OnCreate(Player p, Command cmd)
        {
            LifeHandler handler = new LifeHandler();

            if (!handler.CheckAndGetLifeZone(p, cmd))
            {
                return;
            }

            if (!handler.CheckWorldPermissions(p))
            {
                return;
            }

            if (handler.Life != null)
            {
                p.Message("&WLife with such name exists already, choose another");

                return;
            }

            p.SelectionStart(2, handler.LifeCreateCallback, null, Permission.DrawAdvanced);

            p.MessageNow("Select life zone: place/remove a block or type /Mark to use your location.");
        }
Example #2
0
        private static LifeHandler GetCheckedLifeHandler(Player p, Command cmd)
        {
            LifeHandler handler = new LifeHandler();

            if (!handler.CheckAndGetLifeZone(p, cmd))
            {
                return(null);
            }

            if (handler.Life == null)
            {
                p.Message("&WLife " + handler.Name + " does not exist.");

                return(null);
            }

            return(handler);
        }