Enum Class ScoreboardEvent
- All Implemented Interfaces:
Serializable
,Comparable<ScoreboardEvent>
,Constable
Represents an event that triggers a
Scoreboard
of type ScoreboardType.EVENT
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionEvent triggered when a player enters a bed.Event triggered when a player leaves a bed.Event triggered when a player breaks a block.Event triggered when a player places a block.Event triggered when a player changes world.Event triggered when a player sends a message.Event triggered when a player tags another player.Event triggered when a player dies.Event triggered when a player attacks an entity.Event triggered when a player joins for the first time.Event triggered when a player catches something while fishing.Event triggered when a player joins.Event triggered when a player changes their level.Event triggered when a player changes their language.Event triggered when a player enters a region.Event triggered when a player leaves a region.Event triggered when a player changes their resource pack's status.Event triggered when a player respawns. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScoreboardEvent
Gets a scoreboard's event by its ID.getID()
Gets this event's ID.String[]
Gets the array containing all available placeholders that can be translated with this event's information.static ScoreboardEvent
Returns the enum constant of this class with the specified name.static ScoreboardEvent[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
JOIN
Event triggered when a player joins. -
FIRST_JOIN
Event triggered when a player joins for the first time. -
ENTITY_ATTACK
Event triggered when a player attacks an entity. -
COMBAT_TAG
Event triggered when a player tags another player. -
BLOCK_PLACE
Event triggered when a player places a block. -
BLOCK_BREAK
Event triggered when a player breaks a block. -
CHANGED_WORLD
Event triggered when a player changes world. -
DEATH
Event triggered when a player dies. -
RESPAWN
Event triggered when a player respawns. -
BED_ENTER
Event triggered when a player enters a bed. -
BED_LEAVE
Event triggered when a player leaves a bed. -
CHAT
Event triggered when a player sends a message. -
FISH
Event triggered when a player catches something while fishing. -
LEVEL_CHANGE
Event triggered when a player changes their level. -
LOCALE_CHANGE
Event triggered when a player changes their language. -
RESOURCE_PACK_STATUS
Event triggered when a player changes their resource pack's status. -
REGION_ENTER
Event triggered when a player enters a region. -
REGION_LEAVE
Event triggered when a player leaves a region.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getPlaceholders
Gets the array containing all available placeholders that can be translated with this event's information.- Returns:
- Event's placeholders
-
getID
Gets this event's ID.It is obtained by lowering
Enum.name()
's case and replacing '_' with '-'.Example:
BED_ENTER
-> "bed-enter"- Returns:
- Event's ID
-
get
Gets a scoreboard's event by its ID.Will return
null
if specified ID does not belong to any event.- Parameters:
id
- Event's ID (getID()
)- Returns:
- Scoreboard's event
-