Enum Class CosmeticMoment

java.lang.Object
java.lang.Enum<CosmeticMoment>
dev.itsharshxd.zentrix.api.cosmetics.CosmeticMoment
All Implemented Interfaces:
Serializable, Comparable<CosmeticMoment>, Constable

public enum CosmeticMoment extends Enum<CosmeticMoment>
A moment of a match at which Zentrix triggers an addon's cosmetic type, through CosmeticHandler.onTrigger(dev.itsharshxd.zentrix.api.cosmetics.CosmeticTrigger). A type only hears the moments its definition lists. Spectators trigger nothing but their own DEATH and GAME_LEAVE.
Since:
1.11.0
  • Enum Constant Details

    • GAME_JOIN

      public static final CosmeticMoment GAME_JOIN
      The player joined a match's waiting lobby, or rejoined a running match.
    • GAME_START

      public static final CosmeticMoment GAME_START
      The match started with the player in it.
    • GLIDE

      public static final CosmeticMoment GLIDE
      The player opened their glider, from the dragon bus or a sky drop.
    • KILL

      public static final CosmeticMoment KILL
      The player killed another player; CosmeticTrigger.other() is the victim.
    • DEATH

      public static final CosmeticMoment DEATH
      The player died in the match; CosmeticTrigger.other() is the killer, when there is one, and CosmeticTrigger.location() where they died.
    • VICTORY

      public static final CosmeticMoment VICTORY
      The player's side won the match.
    • GAME_LEAVE

      public static final CosmeticMoment GAME_LEAVE
      The match is over for the player: they left it, or it ended. Heard once by every player who joined or started the match while online, eliminated ones included, so anything kept up since GAME_JOIN or GAME_START can be undone. Players who left the server may miss it; CosmeticHandler.onUnregister() and the addon's own quit handling cover them.
  • Method Details

    • values

      public static CosmeticMoment[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CosmeticMoment valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null