Пример #1
0
 public MinecraftEventHandler()
 {
     // Events that don't need additional arguments
     _packetReceived = new AsyncEvent <PacketReceivedEventArgs>(HandleException, "PacketReceived");
     _playerJoin     = new AsyncEvent <PlayerJoinEventArgs>(HandleException, "PlayerJoin");
     _playerLeave    = new AsyncEvent <PlayerLeaveEventArgs>(HandleException, "PlayerLeave");
     _serverTick     = new AsyncEvent(HandleException, "ServerTick");
 }
Пример #2
0
        public MinecraftEventHandler()
        {
            // Events that don't need additional arguments
            PacketReceived = new("PacketReceived", HandleException);
            QueuePacket    = new("QueuePacket", HandleException);

            PlayerJoin          = new("PlayerJoin", HandleException);
            PlayerLeave         = new("PlayerLeave", HandleException);
            ServerTick          = new("ServerTick", HandleException);
            PermissionGranted   = new("PermissionGranted", HandleException);
            PermissionRevoked   = new("PermissionRevoked", HandleException);
            ClickEvent          = new("InventoryClick", HandleException);
            BlockInteract       = new("BlockInteract", HandleException);
            IncomingChatMessage = new("IncomingChatMessage", HandleException);
            PlayerTeleported    = new("PlayerTeleported", HandleException);
            ServerStatusRequest = new("ServerStatusRequest", HandleException);
        }