Class CosmeticOwnershipChangeEvent

java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.cosmetics.CosmeticOwnershipChangeEvent

public final class CosmeticOwnershipChangeEvent extends ZentrixEvent
Called after a change to what a player owns or chose was stored: a grant or revocation by an administrator or addon, a choice in the cosmetics menu or through the API, a timed cosmetic running out, or ownership imported from MatrixGliders. Only fired when something actually changed. The player may be offline.

Only for built-in categories, so getCategory() always has one; changes to an addon's types are not reported here.

Main thread; only fired while a listener is registered.

Since:
1.8.0
  • Constructor Details

    • CosmeticOwnershipChangeEvent

      public CosmeticOwnershipChangeEvent(@NotNull @NotNull UUID playerId, @NotNull @NotNull CosmeticChange change)
    • CosmeticOwnershipChangeEvent

      public CosmeticOwnershipChangeEvent(@NotNull @NotNull UUID playerId, @NotNull @NotNull CosmeticChange change, @NotNull @NotNull CosmeticOwnershipChangeEvent.Cause cause)
      Since:
      1.9.0
  • Method Details

    • getPlayerId

      @NotNull public @NotNull UUID getPlayerId()
      The player whose cosmetics changed.
    • getCategory

      @NotNull public @NotNull CosmeticCategory getCategory()
      The category that changed.
    • getChange

      @NotNull public @NotNull CosmeticChange getChange()
      The cosmetics before and after.
    • getCause

      @NotNull public @NotNull CosmeticOwnershipChangeEvent.Cause getCause()
      What made the change.
      Since:
      1.9.0
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Description copied from class: ZentrixEvent
      Gets the handler list for this event.
      Overrides:
      getHandlers in class ZentrixEvent
      Returns:
      The handler list
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()