コード例 #1
0
        private void OnServerInitialized()
        {
            Instance = this;

            RegisterPerm("admin");
            RegisterPerm("use");

            LoadData(out portals);
            LoadMessages();

            foreach (PortalInfo portal in portals)
            {
                portal.Create();
            }

            foreach (BasePlayer player in BasePlayer.activePlayerList)
            {
                OnPlayerInit(player);
            }
        }
コード例 #2
0
ファイル: Portals.cs プロジェクト: Remod-org/Portals
        private void OnServerInitialized()
        {
            Instance = this;

            AddCovalenceCommand("portal", "CmdPortal");
            permission.RegisterPermission(permPortalsUse, this);
            permission.RegisterPermission(permPortalsAdmin, this);
            LoadConfigVariables();
            LoadData();

            foreach (PortalInfo portal in portals)
            {
                if (!permission.PermissionExists(portal.RequiredPermission, this))
                {
                    permission.RegisterPermission(portal.RequiredPermission, this);
                }
                portal.ReCreate();
            }
            SaveData();
            initialized = true;
        }