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