public class CharacterUtil
extends java.lang.Object
Character
.Constructor | Description |
---|---|
CharacterUtil() |
Modifier and Type | Method | Description |
---|---|---|
static java.util.Optional<java.lang.Float> |
getHealthDecimal(Character ofCharacter) |
Gets the health of a
Character represented as a floating point number between 0 and 1,
or -1 if the subject's health could not be retrieved: The value returned is only guaranteed to be up to date if the subject's health bar is visible. |
static java.util.Optional<java.lang.Integer> |
getHealthPercentage(Character ofCharacter) |
Gets the health percentage of a
Character . |
static java.util.Optional<Character> |
getTargetCharacter(Character ofCharacter) |
public static java.util.Optional<java.lang.Float> getHealthDecimal(Character ofCharacter)
Character
represented as a floating point number between 0 and 1,
or -1 if the subject's health could not be retrieved: ofCharacter
- the character to get health percentage ofpublic static java.util.Optional<java.lang.Integer> getHealthPercentage(Character ofCharacter)
Character
.
The value returned is only guaranteed to be up to date if the subject's health bar is visible.ofCharacter
- the character to get health percentage of