Пример #1
0
 public virtual void OnPlayerJoined(ClientJoinedEventArgs e)
 {
 }
Пример #2
0
 public void OnJoined()
 {
     LoggedIn = true;
     string DisplayMessage = DisplayName + " has logged in";
     //Event
     ClientJoinedEventArgs e = new ClientJoinedEventArgs(Client);
     Server.PluginManager.CallEvent(Event.PlayerJoined, e);
     //We kick the player because it would not work to use return.
     if (e.EventCanceled)
     {
         _client.Kick("");
         return; //return here so we do not display message
     }
     DisplayMessage = e.BrodcastMessage;
     //End Event
     Server.Broadcast(DisplayMessage);
 }
Пример #3
0
 private void OnJoined()
 {
     LoggedIn = true;
     string DisplayMessage = DisplayName + " has logged in";
     //Event
     ClientJoinedEventArgs e = new ClientJoinedEventArgs(this);
     Server.PluginManager.CallEvent(Event.PLAYER_JOINED, e);
     //We kick the player because it would not work to use return.
     if (e.EventCanceled) Kick("");
     DisplayMessage = e.BrodcastMessage;
     //End Event
     Server.Broadcast(DisplayMessage);
 }
Пример #4
0
 private void OnPlayerJoined(ClientJoinedEventArgs e)
 {
     foreach (EventListener bl in Plugins)
     {
         PlayerListener pl = (PlayerListener)bl.Listener;
         if (bl.Event == Event.PLAYER_JOINED)
             pl.OnPlayerJoined(e);
     }
 }