Class ZentrixEvent

java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
Direct Known Subclasses:
ChatChannelSwitchEvent, CurrencyChangeEvent, DragonBusArrivalEvent, DragonBusSpawnEvent, DragonBusStopEvent, DragonPassengerDismountEvent, GameRuleChangeEvent, PartyCreateEvent, PartyDisbandEvent, PartyLeaderChangeEvent, PartyMemberJoinEvent, PartyMemberLeaveEvent, ScenarioFailureEvent, ScenarioRegisteredEvent, ScenarioUnregisteredEvent, ZentrixGameEvent

public abstract class ZentrixEvent extends org.bukkit.event.Event
Base class for Zentrix events.

All custom events fired by Zentrix extend this class. Addons can listen for game state changes, player actions, and other events through these types.

Listening to events


 public class MyListener implements Listener {

     @EventHandler
     public void onGameStart(GameStartEvent event) {
         ZentrixGame game = event.getGame();
         int playerCount = game.getPlayerCount();
         Bukkit.broadcastMessage("A game started with " + playerCount + " players!");
     }
 }
 

Event categories

  • Game Events - Game lifecycle events (start, end, phase changes)
  • Player Events - Player-specific events (join, leave, death, kill)
  • Team Events - Team-related events (elimination, win)
  • Currency Events - Economy events (balance changes, rewards)
Since:
1.0.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructs a new synchronous Zentrix event.
    protected
    ZentrixEvent(boolean isAsync)
    Constructs a new Zentrix event.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull org.bukkit.event.HandlerList
    Gets the static handler list for this event type.
    @NotNull org.bukkit.event.HandlerList
    Gets the handler list for this event.

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ZentrixEvent

      protected ZentrixEvent()
      Constructs a new synchronous Zentrix event.
    • ZentrixEvent

      protected ZentrixEvent(boolean isAsync)
      Constructs a new Zentrix event.
      Parameters:
      isAsync - true if the event is fired asynchronously, false if fired on the main thread
  • Method Details

    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Gets the handler list for this event.
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      The handler list
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
      Gets the static handler list for this event type.

      Required by Bukkit's event system.

      Returns:
      The handler list