Enum Class TargetPriority
- All Implemented Interfaces:
Serializable,Comparable<TargetPriority>,Constable
Determines which targeting goal wins when multiple goals attempt to
assign a combat target simultaneously. Higher numeric values take
precedence — a goal may only override the current target if its
priority is strictly greater than the one that set the existing target.
The scale is intentionally sparse so that third-party integrations
(via Bukkit) can slot in without colliding. The sentinel
values None (Integer.MIN_VALUE) and
Overwrite (Integer.MAX_VALUE) anchor the extremes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAutonomous aggression toward configured mob types.External target set by another plugin via the Bukkit API.Target forced by the player's Control skill (manual aim).PvP duel target — highest normal-play priority.Target acquired by the Farm (mob-harvesting) behavior.Retaliatory target — the pet was directly damaged.No target set — always loses to any real priority.Unconditional override — always wins.Target inherited from something that damaged the owner.Target inherited from the owner's outgoing attack. -
Method Summary
Modifier and TypeMethodDescriptionintNumeric priority value.static TargetPriorityReturns the enum constant of this class with the specified name.static TargetPriority[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
None
No target set — always loses to any real priority. -
Bukkit
External target set by another plugin via the Bukkit API. -
Farm
Target acquired by the Farm (mob-harvesting) behavior. -
Control
Target forced by the player's Control skill (manual aim). -
GetHurt
Retaliatory target — the pet was directly damaged. -
OwnerHurts
Target inherited from the owner's outgoing attack. -
OwnerGetsHurt
Target inherited from something that damaged the owner. -
Aggressive
Autonomous aggression toward configured mob types. -
Duel
PvP duel target — highest normal-play priority. -
Overwrite
Unconditional override — always wins. Used by admin commands.
-
-
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
-
getPriority
public int getPriority()Numeric priority value. Higher wins when two goals compete.- Returns:
- the priority ordinal for this level
-