Esempio n. 1
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.PLAYER_JOINED:
             OnPlayerJoined(e as ClientJoinedEventArgs);
             break;
         case Event.PLAYER_LEFT:
             OnPlayerLeft(e as ClientLeftEventArgs);
             break;
         case Event.PLAYER_COMMAND:
             OnPlayerCommand(e as ClientCommandEventArgs);
             break;
         case Event.PLAYER_PRE_COMMAND:
             OnPlayerPreCommand(e as ClientCommandEventArgs);
             break;
         case Event.PLAYER_CHAT:
             OnPlayerChat(e as ClientChatEventArgs);
             break;
         case Event.PLAYER_PRE_CHAT:
             OnPlayerPreChat(e as ClientPreChatEventArgs);
             break;
         case Event.PLAYER_KICKED:
             OnPlayerKicked(e as ClientKickedEventArgs);
             break;
         case Event.PLAYER_MOVE:
             OnPlayerMoved(e as ClientMoveEventArgs);
             break;
         case Event.PLAYER_DIED:
             OnPlayerDeath(e as ClientDeathEventArgs);
             break;
     }
 }
Esempio n. 2
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.PlayerJoined:
             OnPlayerJoined(e as ClientJoinedEventArgs);
             break;
         case Event.PlayerLeft:
             OnPlayerLeft(e as ClientLeftEventArgs);
             break;
         case Event.PlayerCommand:
             OnPlayerCommand(e as ClientCommandEventArgs);
             break;
         case Event.PlayerPreCommand:
             OnPlayerPreCommand(e as ClientCommandEventArgs);
             break;
         case Event.PlayerChat:
             OnPlayerChat(e as ClientChatEventArgs);
             break;
         case Event.PlayerPreChat:
             OnPlayerPreChat(e as ClientPreChatEventArgs);
             break;
         case Event.PlayerKicked:
             OnPlayerKicked(e as ClientKickedEventArgs);
             break;
         case Event.PlayerMove:
             OnPlayerMoved(e as ClientMoveEventArgs);
             break;
         case Event.PlayerDied:
             OnPlayerDeath(e as ClientDeathEventArgs);
             break;
     }
 }
Esempio n. 3
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.PacketReceived:
             OnPacketReceived(e as PacketRecevedEventArgs);
             break;
         case Event.PacketSent:
             OnPacketSent(e as PacketSentEventArgs);
             break;
     }
 }
Esempio n. 4
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.PluginEnabled:
             OnPluginEnabled(e as PluginEnabledEventArgs);
             break;
         case Event.PluginDisabled:
             OnPluginDisabled(e as PluginDisabledEventArgs);
             break;
         case Event.CommandAdded:
             OnPluginCommandAdded(e as CommandAddedEventArgs);
             break;
         case Event.CommandRemoved:
             OnPluginCommandRemoved(e as CommandRemovedEventArgs);
             break;
     }
 }
Esempio n. 5
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.PLUGIN_ENABLED:
             OnPluginEnabled(e as PluginEnabledEventArgs);
             break;
         case Event.PLUGIN_DISABLED:
             OnPluginDisabled(e as PluginDisabledEventArgs);
             break;
         case Event.COMMAND_ADDED:
             OnPluginCommandAdded(e as CommandAddedEventArgs);
             break;
         case Event.COMMAND_REMOVED:
             OnPluginCommandRemoved(e as CommandRemovedEventArgs);
             break;
     }
 }
Esempio n. 6
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.LoggerLog:
             OnLog(e as LoggerEventArgs);
             break;
         case Event.ServerAccept:
             OnAccept(e as ClientAcceptedEventArgs);
             break;
         case Event.ServerBroadcast:
             OnBroadcast(e as ServerBroadcastEventArgs);
             break;
         case Event.ServerChat:
             OnChat(e as ServerChatEventArgs);
             break;
         case Event.ServerCommand:
             OnCommand(e as ServerCommandEventArgs);
             break;
     }
 }
Esempio n. 7
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.LOGGER_LOG:
             OnLog(e as LoggerEventArgs);
             break;
         case Event.SERVER_ACCEPT:
             OnAccept(e as ClientAcceptedEventArgs);
             break;
         case Event.SERVER_BROADCAST:
             OnBroadcast(e as ServerBroadcastEventArgs);
             break;
         case Event.SERVER_CHAT:
             OnChat(e as ServerChatEventArgs);
             break;
         case Event.SERVER_COMMAND:
             OnCommand(e as ServerCommandEventArgs);
             break;
     }
 }
Esempio n. 8
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.WORLD_LOAD:
             OnWorldLoaded(e as WorldLoadEventArgs);
             break;
         case Event.WORLD_UNLOAD:
             OnLeveUnloaded(e as WorldUnloadEventArgs);
             break;
         case Event.WORLD_JOIN:
             OnWorldJoined(e as WorldJoinedEventArgs);
             break;
         case Event.WORLD_LEAVE:
             OnWorldLeft(e as WorldLeftEventArgs);
             break;
         case Event.WORLD_CREATE:
             OnWorldCreated(e as WorldCreatedEventArgs);
             break;
         case Event.WORLD_DELETE:
             OnWorldDeleted(e as WorldDeletedEventArgs);
             break;
     }
 }
Esempio n. 9
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case Event.WorldLoad:
             OnWorldLoaded(e as WorldLoadEventArgs);
             break;
         case Event.WorldUnload:
             OnLeveUnloaded(e as WorldUnloadEventArgs);
             break;
         case Event.WorldJoin:
             OnWorldJoined(e as WorldJoinedEventArgs);
             break;
         case Event.WorldLeave:
             OnWorldLeft(e as WorldLeftEventArgs);
             break;
         case Event.WorldCreate:
             OnWorldCreated(e as WorldCreatedEventArgs);
             break;
         case Event.WorldDelete:
             OnWorldDeleted(e as WorldDeletedEventArgs);
             break;
     }
 }
Esempio n. 10
0
 /// <summary>
 /// Calles an event.
 /// </summary>
 /// <param name="Event">The Event to be called</param>
 /// <param name="args">The Event Args.</param>
 public void CallEvent(Event Event, ChraftEventArgs args)
 {
     PluginHooks.Find(Event).CallEvent(Event, args);
 }
Esempio n. 11
0
 /// <summary>
 /// Used while I convert the event system from the string format to the new enum format.
 /// </summary>
 /// <param name="Event">The Event to be called</param>
 /// <param name="args">The Event Args.</param>
 //TODO: Convert all calls to CallEvent(string, ChraftEventArgs) to the new format.
 public void CallEvent(string Event, ChraftEventArgs args)
 {
     //Temporary fix.
     CallEvent((Event)Enum.Parse(typeof(Event), Event, true), args);
 }