Beispiel #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;
        }
 /// <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>
 public static void Register(Player.OnPlayerChat 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 OnMessageRecieveEvent(method, priority, plugin));
     Organize();
 }
Beispiel #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;
 }
 /// <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;
 }
 /// <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(Player.OnPlayerChat 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 OnPlayerChatEvent(method, priority, plugin));
     Organize();
 }
 internal OnMessageRecieveEvent(Player.OnPlayerChat method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
Beispiel #7
0
 internal OnMessageRecieveEvent(Player.OnPlayerChat method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
        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;
        }