Interface Event

All Known Implementing Classes:
BaseEvent, BeeStingEvent, CollisionEvent, EntityDamageEntityEvent, EntityDamageEvent, EntityDeathEvent, EntityDespawnEvent, EntityEvent, EntityMoveEvent, EntitySpawnEvent, PartCollisionEvent, TileCollisionEvent

public interface Event
Represents a cancellable event in the game system.

Events are objects that can be posted to an EventBus and handled by EventListeners. Certain events can be cancelled to prevent default behavior or propagation.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels this event.
    boolean
    Checks whether this event has been canceled.
    void
    setCanceled(boolean canceled)
    Sets the canceled state of this event.
  • Method Details

    • cancel

      void cancel()
      Cancels this event.

      Calling this method sets the event's canceled state to true.

      See Also:
    • isCanceled

      boolean isCanceled()
      Checks whether this event has been canceled.
      Returns:
      true if the event is canceled, false otherwise
      See Also:
    • setCanceled

      void setCanceled(boolean canceled)
      Sets the canceled state of this event.
      Parameters:
      canceled - true to cancel the event, false to uncancel
      See Also: