Beispiel #1
0
 public virtual void OnPlace(BlockPlaceEventArgs e)
 {
 }
Beispiel #2
0
 /// <summary>
 /// Raises the block placement event
 /// </summary>
 /// <param name="entity">entity who placed the block</param>
 /// <param name="block">block that has been placed</param>
 /// <returns>resulting event args</returns>
 protected virtual bool RaisePlaceEvent(EntityBase entity, StructBlock block)
 {
     BlockPlaceEventArgs e = new BlockPlaceEventArgs(this, entity);
     block.World.Server.PluginManager.CallEvent(Plugins.Events.Event.BlockPlace, e);
     // Destruction made not by the living can not be interrupted?
     if (entity == null)
         return true;
     return !e.EventCanceled;
 }
Beispiel #3
0
 private void OnPlace(BlockPlaceEventArgs e)
 {
     foreach (EventListener el in Plugins)
     {
         if (el.Event == Event.BlockPlace)
         {
             BlockListener l = el.Listener as BlockListener;
             l.OnPlace(e);
         }
     }
 }