Klasse Event

java.lang.Object
net.risingworld.api.events.Event
Bekannte direkte Unterklassen:
AddAdminEvent, ExplosionEvent, InputEvent, ItemTransformEvent, LateUpdateEvent, MetaObjectEvent, NpcAddClothesEvent, NpcAddSaddleBagEvent, NpcAddSaddleEvent, NpcDamageEvent, NpcDeathEvent, NpcHitNpcEvent, NpcRemoveClothesEvent, NpcRemoveSaddleBagEvent, NpcRemoveSaddleEvent, NpcSpawnEvent, NpcTransformEvent, PlantGrowthEvent, PlayerEvent, ProjectileFireEvent, ProjectileHitEvent, ReadyEvent, RemoveAdminEvent, ShutdownEvent, SkipNightEvent, UpdateEvent, WeatherChangeEvent

public abstract class Event extends Object
Base class for all events.
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    protected boolean
    Only relevant for cancellable events (see Cancellable interface)
    protected long
    Pointer to the native event
  • Konstruktorübersicht

    Konstruktoren
    Modifizierer
    Konstruktor
    Beschreibung
    protected
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
     
    int
     
    final boolean
    Checks if the event is still valid.
    In general, events have a very short life cycle - they're only valid the moment they're triggered.

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • pointer

      protected long pointer
      Pointer to the native event
    • cancelled

      protected boolean cancelled
      Only relevant for cancellable events (see Cancellable interface)
  • Konstruktordetails

    • Event

      protected Event()
  • Methodendetails

    • isValid

      public final boolean isValid()
      Checks if the event is still valid.
      In general, events have a very short life cycle - they're only valid the moment they're triggered. At the end of the frame, their pointer is set to null (and the native resource gets disposed), so they can no longer be used.
      You must not use event instances outside the particular listener methods! For example, never store them in a list or access them from another thread.

      Note: This is only relevant for built-in events! When using your custom events (classes derived from Event), you can ignore this method.
      Gibt zurück:
      true if the event is still valid (and can be used), false if not
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object