Esempio n. 1
0
        private void regMobileEvents()
        {
            _log              += LogServerMobile;
            _opLog            += LogOpMobile;
            _adminLog         += LogAdminMobile;
            _settings         += SettingsUpdateMobile;
            _playerConnect    += PlayerConnectMobile;
            _playerDisconnect += PlayerDisconnectMobile;
            _playerChat       += PlayerChatMobile;
            _levelLoad        += LevelLoadMobile;
            _levelUnload      += LevelUnloadMobile;
            _groupSave        += GroupChangedMobile;
            _groupLoad        += GroupChangedMobile;

            Server.s.OnAdmin          += _adminLog;
            Server.s.OnOp             += _opLog;
            Server.s.OnLog            += _log;
            Server.s.OnSettingsUpdate += _settings;
            Player.PlayerChat         += _playerChat;
            Player.PlayerConnect      += _playerConnect;
            Player.PlayerDisconnect   += _playerDisconnect;
            Level.LevelLoad           += _levelLoad;
            Level.LevelUnload         += _levelUnload;
            Group.OnGroupLoad         += _groupLoad;
            Group.OnGroupSave         += _groupSave;
        }
 public static void Register(Player.OnPlayerDisconnect method, Priority priority, Plugin plugin)
 {
     if (Find(plugin) != null)
     {
         throw new Exception("The user tried to register 2 of the same event!");
     }
     events.Add(new PlayerDisconnectEvent(method, priority, plugin));
     Organize();
 }
Esempio n. 3
0
 /// <summary>
 /// This is the load method, the load method is called whenever the plugin is loaded
 /// this can be when the server starts up, or when using /pload
 /// </summary>
 /// <param name="startup">Is the plugin being loaded at server startup?</param>
 public override void Load(bool startup)
 {
     block = new Player.BlockchangeEventHandler2(blockuse);
     command = new Player.OnPlayerCommand(commanduse);
     Player.PlayerCommand += command;
     chat = new Player.OnPlayerChat(chatuse);
     disconnect = new Player.OnPlayerDisconnect(disconnectuse);
     Player.PlayerChat += chat;
     Player.PlayerBlockChange += block;
     Player.PlayerDisconnect += disconnect;
 }
Esempio n. 4
0
 /// <summary>
 /// This is the load method, the load method is called whenever the plugin is loaded
 /// this can be when the server starts up, or when using /pload
 /// </summary>
 /// <param name="startup">Is the plugin being loaded at server startup?</param>
 public override void Load(bool startup)
 {
     block   = new Player.BlockchangeEventHandler2(blockuse);
     command = new Player.OnPlayerCommand(commanduse);
     Player.PlayerCommand += command;
     chat                      = new Player.OnPlayerChat(chatuse);
     disconnect                = new Player.OnPlayerDisconnect(disconnectuse);
     Player.PlayerChat        += chat;
     Player.PlayerBlockChange += block;
     Player.PlayerDisconnect  += disconnect;
 }
        private void RegEvents()
        {
            _logHandler         += LogChatDesktop;
            _onPlayerConnect    += PlayerConnect;
            _onPlayerDisconnect += PlayerDisconnect;
            _levelUnloaded      += LevelUnloadDesktop;
            _levelLoaded        += LevelLoadDesktop;

            Server.s.OnLog          += _logHandler;
            Player.PlayerConnect    += _onPlayerConnect;
            Player.PlayerDisconnect += _onPlayerDisconnect;
            Level.LevelLoaded       += _levelLoaded;
            Level.LevelUnload       += _levelUnloaded;

#if Debug
            Server.s.Log("Registered Events");
#endif
        }
Esempio n. 6
0
        public override void LoadEvents()
        {
            _logHandler += OnLog;
            _onPlayerConnect += PlayerConnect;
            _onPlayerDisconnect += PlayerDisconnect;
            _levelUnloaded += LevelUnload;
            _levelLoaded += LevelLoad;

            Server.s.OnLog += _logHandler;
            Player.PlayerConnect += _onPlayerConnect;
            Player.PlayerDisconnect += _onPlayerDisconnect;
            Level.LevelLoaded += _levelLoaded;
            Level.LevelUnload += _levelUnloaded;

            #if Debug
                        Server.s.Log("Registered Events");
            #endif
        }
Esempio n. 7
0
 internal OnPlayerDisconnectEvent(Player.OnPlayerDisconnect method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
 internal OnPlayerDisconnectEvent(Player.OnPlayerDisconnect method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
Esempio n. 9
0
        private void regMobileEvents()
        {
            _log += LogServerMobile;
            _opLog += LogOpMobile;
            _adminLog += LogAdminMobile;
            _settings += SettingsUpdateMobile;
            _playerConnect += PlayerConnectMobile;
            _playerDisconnect += PlayerDisconnectMobile;
             _playerChat += PlayerChatMobile;
            _levelLoad += LevelLoadMobile;
            _levelUnload += LevelUnloadMobile;
            _groupSave += GroupChangedMobile;
            _groupLoad += GroupChangedMobile;

            Server.s.OnAdmin += _adminLog;
            Server.s.OnOp += _opLog;
            Server.s.OnLog += _log;
            Server.s.OnSettingsUpdate += _settings;
            Player.PlayerChat += _playerChat;
            Player.PlayerConnect += _playerConnect;
            Player.PlayerDisconnect += _playerDisconnect;
            Level.LevelLoad += _levelLoad;
            Level.LevelUnload += _levelUnload;
            Group.OnGroupLoad += _groupLoad;
            Group.OnGroupSave += _groupSave;
        }
Esempio n. 10
0
        private void RegEvents()
        {
            _logHandler += LogChatDesktop;
            _onPlayerConnect += PlayerConnect;
            _onPlayerDisconnect += PlayerDisconnect;
            _levelUnloaded += LevelUnloadDesktop;
            _levelLoaded += LevelLoadDesktop;

            Server.s.OnLog += _logHandler;
            Player.PlayerConnect += _onPlayerConnect;
            Player.PlayerDisconnect += _onPlayerDisconnect;
            Level.LevelLoaded += _levelLoaded;
            Level.LevelUnload += _levelUnloaded;

            #if Debug
            Server.s.Log("Registered Events");
            #endif
        }