Enum PrivateArenaJoinEvent.Result
java.lang.Object
java.lang.Enum<PrivateArenaJoinEvent.Result>
me.harsh.privategamesaddon.api.events.PrivateArenaJoinEvent.Result
- All Implemented Interfaces:
Serializable,Comparable<PrivateArenaJoinEvent.Result>,java.lang.constant.Constable
- Enclosing class:
PrivateArenaJoinEvent
Defines what is the outcome of a player's attempt to join a private arena.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe player is allowed to join due to a custom reason (only from API).The player is allowed to join because they are a server admin and forc-joined.The player is allowed to join because they are a member of the party.The player is denied from joining due to a custom reason (only from API).The player is denied from joining because they are not in the party. -
Method Summary
Modifier and TypeMethodDescription@Nullable AddPlayerIssuegetIssue()Get the issue associated with this result.booleanisAllow()Check whether this result allows the player to join.booleanisDeny()Check whether this result denies the player from joining.static PrivateArenaJoinEvent.ResultReturns the enum constant of this type with the specified name.static PrivateArenaJoinEvent.Result[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ALLOW_IS_MEMBER
The player is allowed to join because they are a member of the party. -
ALLOW_IS_ADMIN
The player is allowed to join because they are a server admin and forc-joined. -
ALLOW_CUSTOM
The player is allowed to join due to a custom reason (only from API).No join message will be sent.
-
DENY_NOT_IN_PARTY
The player is denied from joining because they are not in the party. -
DENY_CUSTOM
The player is denied from joining due to a custom reason (only from API).No deny message will be sent.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
isAllow
public boolean isAllow()Check whether this result allows the player to join.- Returns:
trueif the player is allowed to join,falseotherwise
-
isDeny
public boolean isDeny()Check whether this result denies the player from joining.- Returns:
trueif the player is denied from joining,falseotherwise
-
getIssue
Get the issue associated with this result.Do note that the internal logic may not always use this issue directly due to the need of async loading.
- Returns:
- The associated issue, or
nullifisDeny()
-