Exemplo 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;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Register this event
 /// </summary>
 /// <param name="method">This is the delegate that will get called when this event occurs</param>
 /// <param name="priority">The priority (imporantce) of this call</param>
 /// <param name="plugin">The plugin object that is registering the event</param>
 /// <param name="bypass">Register more than one of the same event</param>
 public static void Register(Level.OnLevelLoad method, Priority priority, Plugin plugin, bool bypass = false)
 {
     if (Find(plugin) != null)
     {
         if (!bypass)
         {
             throw new Exception("The user tried to register 2 of the same event!");
         }
     }
     events.Add(new OnLevelLoadEvent(method, priority, plugin));
     Organize();
 }
Exemplo n.º 3
0
 internal OnLevelLoadEvent(Level.OnLevelLoad method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
Exemplo n.º 4
0
 internal OnLevelLoadEvent(Level.OnLevelLoad method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
Exemplo n.º 5
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;
        }