Ejemplo n.º 1
0
 private void OnDestroy(BlockDestroyEventArgs e)
 {
     foreach (EventListener el in Plugins)
     {
         if (el.Event == Event.BlockDestroy)
         {
             IBlockListener l = el.Listener as IBlockListener;
             l.OnDestroy(e);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Raises the block destruction event
 /// </summary>
 /// <param name="entity">entity who destroyed the block</param>
 /// <param name="block">block that has been destroyed</param>
 /// <returns>resulting event args</returns>
 protected virtual BlockDestroyEventArgs RaiseDestroyEvent(IEntityBase entity, StructBlock block)
 {
     BlockDestroyEventArgs e = new BlockDestroyEventArgs(this, entity);
     block.World.Server.PluginManager.CallEvent(Event.BlockDestroy, e);
     return e;
 }