Enum Class TargetPlayer
- All Implemented Interfaces:
Serializable
,Comparable<TargetPlayer>
,Constable
Indicates a player reference.
-
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 whose turn it currently is.When this is specified, the spell or action is typically repeated twice, once for each player and starting with thesource
owner.Indicates either player.The player whose turn it is not.The opponent of the player that owns thesource
of the spell or action.The player that owns thetarget
of the spell or action.The first player.The second player.The player that owns thesource
of the spell or action. -
Method Summary
Modifier and TypeMethodDescriptionstatic TargetPlayer
getTargetPlayerForOwner
(int owner) Returns a target player specific to the specified owner.static TargetPlayer
Returns the enum constant of this class with the specified name.static TargetPlayer[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SELF
The player that owns thesource
of the spell or action. -
OPPONENT
The opponent of the player that owns thesource
of the spell or action. -
BOTH
When this is specified, the spell or action is typically repeated twice, once for each player and starting with thesource
owner. -
OWNER
The player that owns thetarget
of the spell or action. -
ACTIVE
The player whose turn it currently is. -
INACTIVE
The player whose turn it is not. -
PLAYER_1
The first player. -
PLAYER_2
The second player. -
EITHER
Indicates either player. Used for filters and conditions.
-
-
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
-
getTargetPlayerForOwner
Returns a target player specific to the specified owner.- Parameters:
owner
-- Returns:
-