示例#1
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case PluginSystem.Event.Event.PlayerJoined:
             OnPlayerJoined(e as ClientJoinedEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerLeft:
             OnPlayerLeft(e as ClientLeftEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerCommand:
             OnPlayerCommand(e as ClientCommandEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerPreCommand:
             OnPlayerPreCommand(e as ClientCommandEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerChat:
             OnPlayerChat(e as ClientChatEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerPreChat:
             OnPlayerPreChat(e as ClientPreChatEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerKicked:
             OnPlayerKicked(e as ClientKickedEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerMove:
             OnPlayerMoved(e as ClientMoveEventArgs);
             break;
         case PluginSystem.Event.Event.PlayerDied:
             OnPlayerDeath(e as ClientDeathEventArgs);
             break;
     }
 }
示例#2
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case PluginSystem.Event.Event.PacketReceived:
             OnPacketReceived(e as PacketRecevedEventArgs);
             break;
         case PluginSystem.Event.Event.PacketSent:
             OnPacketSent(e as PacketSentEventArgs);
             break;
     }
 }
示例#3
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case PluginSystem.Event.Event.BlockDestroy:
             OnDestroy(e as BlockDestroyEventArgs);
             break;
         case PluginSystem.Event.Event.BlockPlace:
             OnPlace(e as BlockPlaceEventArgs);
             break;
         case PluginSystem.Event.Event.BlockTouch:
             OnTouch(e as BlockTouchEventArgs);
             break;
     }
 }
示例#4
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case PluginSystem.Event.Event.PluginEnabled:
             OnPluginEnabled(e as PluginEnabledEventArgs);
             break;
         case PluginSystem.Event.Event.PluginDisabled:
             OnPluginDisabled(e as PluginDisabledEventArgs);
             break;
         case PluginSystem.Event.Event.CommandAdded:
             OnPluginCommandAdded(e as CommandAddedEventArgs);
             break;
         case PluginSystem.Event.Event.CommandRemoved:
             OnPluginCommandRemoved(e as CommandRemovedEventArgs);
             break;
     }
 }
示例#5
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case PluginSystem.Event.Event.EntityAttack:
             OnAttack(e as EntityAttackEventArgs);
             break;
         case PluginSystem.Event.Event.EntityDamage:
             OnDamaged(e as EntityDamageEventArgs);
             break;
         case PluginSystem.Event.Event.EntityDeath:
             OnDeath(e as EntityDeathEventArgs);
             break;
         case PluginSystem.Event.Event.EntityMove:
             OnMove(e as EntityMoveEventArgs);
             break;
         case PluginSystem.Event.Event.EntitySpawn:
             OnSpawn(e as EntitySpawnEventArgs);
             break;
     }
 }
示例#6
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case PluginSystem.Event.Event.LoggerLog:
             OnLog(e as LoggerEventArgs);
             break;
         case PluginSystem.Event.Event.ServerAccept:
             OnAccept(e as ClientAcceptedEventArgs);
             break;
         case PluginSystem.Event.Event.ServerBroadcast:
             OnBroadcast(e as ServerBroadcastEventArgs);
             break;
         case PluginSystem.Event.Event.ServerChat:
             OnChat(e as ServerChatEventArgs);
             break;
         case PluginSystem.Event.Event.ServerCommand:
             OnCommand(e as ServerCommandEventArgs);
             break;
     }
 }
示例#7
0
 public void CallEvent(Event Event, ChraftEventArgs e)
 {
     switch (Event)
     {
         case PluginSystem.Event.Event.WorldLoad:
             OnWorldLoaded(e as WorldLoadEventArgs);
             break;
         case PluginSystem.Event.Event.WorldUnload:
             OnLeveUnloaded(e as WorldUnloadEventArgs);
             break;
         case PluginSystem.Event.Event.WorldJoin:
             OnWorldJoined(e as WorldJoinedEventArgs);
             break;
         case PluginSystem.Event.Event.WorldLeave:
             OnWorldLeft(e as WorldLeftEventArgs);
             break;
         case PluginSystem.Event.Event.WorldCreate:
             OnWorldCreated(e as WorldCreatedEventArgs);
             break;
         case PluginSystem.Event.Event.WorldDelete:
             OnWorldDeleted(e as WorldDeletedEventArgs);
             break;
     }
 }
示例#8
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);
        }