protected override void Load()
 {
     HomeCommand.Instance = this;
     WaitGroups           = new Dictionary <string, byte>();
     foreach (HomeGroup hg in this.Configuration.Instance.WaitGroups)
     {
         WaitGroups.Add(hg.Id, hg.Wait);
     }
 }
Exemple #2
0
        public void Execute(IRocketPlayer caller, string[] bed)
        {
            UnturnedPlayer playerid = (UnturnedPlayer)caller;

            Rocket.Core.Logging.Logger.Log(playerid.IsAdmin.ToString() + " is admin");
            Rocket.Core.Logging.Logger.Log(playerid.Features.GodMode.ToString() + " is god mode");
            HomePlayer homeplayer = playerid.GetComponent <HomePlayer>();

            Rocket.Core.Logging.Logger.Log(homeplayer.name + " name");
            object[] cont = HomeCommand.CheckConfig(playerid);
            Rocket.Core.Logging.Logger.Log(cont[1].ToString());
            if (!(bool)cont[0])
            {
                return;
            }
            // A bed was found, so let's run a few checks.
            homeplayer.GoHome((Vector3)cont[1], (byte)cont[2], playerid);
        }