コード例 #1
0
ファイル: ClientEvent.cs プロジェクト: TheaP/c-raft
 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
ファイル: PacketEvent.cs プロジェクト: TheaP/c-raft
 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
ファイル: BlockEvent.cs プロジェクト: TheaP/c-raft
 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
ファイル: PluginEvent.cs プロジェクト: TheaP/c-raft
 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
ファイル: EntityEvent.cs プロジェクト: TheaP/c-raft
 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
ファイル: ServerEvent.cs プロジェクト: TheaP/c-raft
 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
ファイル: WorldEvent.cs プロジェクト: TheaP/c-raft
 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
ファイル: PluginManager.cs プロジェクト: TheaP/c-raft
        /// <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);
        }