private void OnDestroy(BlockDestroyEventArgs e) { foreach (EventListener el in Plugins) { if (el.Event == Event.BLOCK_DESTROY) { BlockListener l = el.Listener as BlockListener; l.OnDestroy(e); } } }
/// <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(EntityBase entity, StructBlock block) { BlockDestroyEventArgs e = new BlockDestroyEventArgs(this, entity); block.World.Server.PluginManager.CallEvent(Plugins.Events.Event.BlockDestroy, e); return e; }
public virtual void OnDestroy(BlockDestroyEventArgs e) { }