Class OSRSPlayer
- java.lang.Object
-
- com.runemate.game.api.hybrid.entities.Entity
-
- com.runemate.game.api.osrs.entities.OSRSCacheModelEntity
-
- com.runemate.game.api.osrs.entities.OSRSEntity
-
- com.runemate.game.api.osrs.entities.OSRSPlayer
-
- All Implemented Interfaces:
Actor
,Animable
,Interactable
,Locatable
,Modeled
,Onymous
,Renderable
,Rotatable
,LocatableEntity
,Player
,Validatable
public final class OSRSPlayer extends OSRSEntity implements Player
-
-
Constructor Summary
Constructors Constructor Description OSRSPlayer(long uid)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.runemate.client.game.open.OpenPlayer
actor()
CombatGauge
getAdrenalineGauge()
Gets the adrenaline gauge that's available during combatint
getAnimationFrame()
Gets the current frame of the actors animationint
getAnimationId()
Gets the entities current animation idlong
getAppearanceHash()
Area.Rectangular
getArea(Coordinate regionBase)
Gets the area using the region base as the coordinate to offset from.int
getCombatLevel()
Gets the combat level of this player@Nullable java.lang.String
getDialogue()
Gets the dialogue above an actors head@NonNull java.util.List<ItemDefinition>
getEquipment()
Deprecated.SummonedFamiliar
getFamiliar()
An RS3 exclusive that gets the currently summoned familiar.@Nullable CombatGauge
getHealthGauge()
The health gauge displayed during combatint
getHighPrecisionOrientation()
For internal usage only.Coordinate.HighPrecision
getHighPrecisionPosition(Coordinate regionBase)
Gets the high precision position using the region base as the coordinate to offset from.@NonNull java.util.List<Hitsplat>
getHitsplats()
Model
getModel()
Gets the polygon-based model of the entityjava.lang.String
getName()
int
getNpcTransformationId()
The id of this players alternative, npc-based form.int
getOrientationAsAngle()
Gets the current orientation as an angle.@NonNull java.util.List<OverheadIcon>
getOverheadIcons()
Gets a list of the overhead icons currently above the npc.@NonNull java.util.List<Coordinate>
getPath()
@Nullable Coordinate
getPosition(Coordinate regionBase)
Gets the position using the region base as the coordinate to offset from.Coordinate
getServerPosition()
Gets the position of the actor according to the server.@NonNull java.util.List<java.lang.Integer>
getSpotAnimationIds()
Gets a list of the spot animation ids of the entity.int
getStanceFrame()
Gets the current frame of the actors stance animationint
getStanceId()
Gets the current stance animation id@Nullable Actor
getTarget()
Gets the Actor that this Actor is targeting (talking, attacking, trading, pickpocketing, etc)int
getTeamId()
java.lang.String
getTitlePrefix()
Deprecated.java.lang.String
getTitleSuffix()
Deprecated.int
getTotalLevel()
The total skill level of this player.int
getWildernessDepth()
The level of the wilderness this player is in (RS3 only)ItemDefinition
getWornItem(Equipment.Slot slot)
@NonNull java.util.List<ItemDefinition>
getWornItems()
boolean
interact(java.lang.String action)
boolean
isFacing(Locatable locatable)
Checks if this rotatable entity is facing a locatable objectboolean
isFemale()
Whether or not the player is femaleboolean
isMoving()
Gets whether or not the actor is moving across the world graphboolean
isValid()
Verifies whether this entity is valid and still exists, typically on the world-graphjava.lang.String
toString()
-
Methods inherited from class com.runemate.game.api.osrs.entities.OSRSEntity
contains, getInteractionPoint, getVisibility, isHovered, isVisible, render, render
-
Methods inherited from class com.runemate.game.api.osrs.entities.OSRSCacheModelEntity
click, interact
-
Methods inherited from class com.runemate.game.api.hybrid.entities.Entity
equals, hasDynamicBounds, hashCode, releaseUidOnGarbageCollection, setBackupModel, setBackupModel, setBackupModel, setForcedModel, setForcedModel, setForcedModel
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.Actor
getAnimationFrame, getDialogue, getHealthGauge, getHitsplats, getPath, getServerPosition, getSpotAnimationIds, getStanceFrame, getStanceId, getTarget, isMoving
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Animable
getAnimationId
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Interactable
click, contains, getInteractionPoint, getInteractionPoint, getVisibility, hasDynamicBounds, hover, interact, interact, interact, interact, interact, isHovered, isVisible
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Locatable
distanceTo, distanceTo, getLocalPosition
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.LocatableEntity
getArea, getHighPrecisionPosition, getHighPrecisionPosition, getPosition, getPosition
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Modeled
setBackupModel, setBackupModel, setBackupModel, setForcedModel, setForcedModel, setForcedModel
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.Player
getNpcId, getTitlePostfix
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Renderable
render, render
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Rotatable
getHighPrecisionOrientation, getOrientationAsAngle, isFacing
-
-
-
-
Method Detail
-
actor
public com.runemate.client.game.open.OpenPlayer actor()
-
getAdrenalineGauge
@RS3Only public CombatGauge getAdrenalineGauge()
Description copied from interface:Player
Gets the adrenaline gauge that's available during combat- Specified by:
getAdrenalineGauge
in interfacePlayer
- Returns:
- The adrenaline gauge when in combat, otherwise null
-
getCombatLevel
public int getCombatLevel()
Description copied from interface:Player
Gets the combat level of this player- Specified by:
getCombatLevel
in interfacePlayer
- Returns:
- the combat level, otherwise -1
-
getFamiliar
@RS3Only public SummonedFamiliar getFamiliar()
Description copied from interface:Player
An RS3 exclusive that gets the currently summoned familiar.- Specified by:
getFamiliar
in interfacePlayer
-
getNpcTransformationId
public int getNpcTransformationId()
Description copied from interface:Player
The id of this players alternative, npc-based form. Typically available when a player is transformed such as when a monkey at Ape Atoll.- Specified by:
getNpcTransformationId
in interfacePlayer
-
getTitlePrefix
@RS3Only @Nullable @Deprecated public java.lang.String getTitlePrefix()
Deprecated.Description copied from interface:Player
Gets this players title (when prefixed) (i.e. Lord, King)(RS3 only)- Specified by:
getTitlePrefix
in interfacePlayer
-
getTitleSuffix
@RS3Only @Nullable @Deprecated public java.lang.String getTitleSuffix()
Deprecated.Description copied from interface:Player
Gets this players title (when suffixed) (RS3 only)- Specified by:
getTitleSuffix
in interfacePlayer
-
getTotalLevel
public int getTotalLevel()
Description copied from interface:Player
The total skill level of this player.- Specified by:
getTotalLevel
in interfacePlayer
- Returns:
- 0 if your weapon is unsheathed on RS3 and 0 if some unknown condition is fufilled on OSRS, otherwise the total level of the player
-
getWildernessDepth
@RS3Only public int getWildernessDepth()
Description copied from interface:Player
The level of the wilderness this player is in (RS3 only)- Specified by:
getWildernessDepth
in interfacePlayer
-
isFemale
public boolean isFemale()
Description copied from interface:Player
Whether or not the player is female
-
getEquipment
@Deprecated @NonNull public @NonNull java.util.List<ItemDefinition> getEquipment()
Deprecated.- Specified by:
getEquipment
in interfacePlayer
-
getWornItems
@NonNull public @NonNull java.util.List<ItemDefinition> getWornItems()
- Specified by:
getWornItems
in interfacePlayer
-
getWornItem
@Nullable public ItemDefinition getWornItem(Equipment.Slot slot)
- Specified by:
getWornItem
in interfacePlayer
-
getModel
public Model getModel()
Description copied from interface:Modeled
Gets the polygon-based model of the entity- Specified by:
getModel
in interfaceModeled
- Overrides:
getModel
in classOSRSEntity
- Returns:
- the entities model, otherwise the backup if set, if neither are available null
-
getArea
@Nullable public Area.Rectangular getArea(Coordinate regionBase)
Description copied from interface:LocatableEntity
Gets the area using the region base as the coordinate to offset from. For optimization.- Specified by:
getArea
in interfaceLocatableEntity
- Overrides:
getArea
in classOSRSEntity
- Parameters:
regionBase
- The Coordinate base of the loaded region
-
getOverheadIcons
@NonNull public @NonNull java.util.List<OverheadIcon> getOverheadIcons()
Description copied from interface:Actor
Gets a list of the overhead icons currently above the npc.- Specified by:
getOverheadIcons
in interfaceActor
-
interact
public boolean interact(java.lang.String action)
- Specified by:
interact
in interfaceInteractable
-
isValid
public boolean isValid()
Description copied from interface:Validatable
Verifies whether this entity is valid and still exists, typically on the world-graph- Specified by:
isValid
in interfaceValidatable
- Overrides:
isValid
in classEntity
- Returns:
- true if it's still available, otherwise false
-
getAppearanceHash
public long getAppearanceHash()
- Specified by:
getAppearanceHash
in interfacePlayer
-
getAnimationId
public final int getAnimationId()
Description copied from interface:Animable
Gets the entities current animation id- Specified by:
getAnimationId
in interfaceAnimable
- Returns:
- the current animation id, or if unavailable -1
-
getAnimationFrame
public final int getAnimationFrame()
Description copied from interface:Actor
Gets the current frame of the actors animation- Specified by:
getAnimationFrame
in interfaceActor
- Returns:
- the current frame, otherwise -1
-
getStanceId
public int getStanceId()
Description copied from interface:Actor
Gets the current stance animation id- Specified by:
getStanceId
in interfaceActor
- Returns:
- the current stance animation id, otherwise -1
-
getStanceFrame
public final int getStanceFrame()
Description copied from interface:Actor
Gets the current frame of the actors stance animation- Specified by:
getStanceFrame
in interfaceActor
- Returns:
- the current frame, otherwise -1
-
getHighPrecisionOrientation
public final int getHighPrecisionOrientation()
Description copied from interface:Rotatable
For internal usage only. Subject to removal without notice.- Specified by:
getHighPrecisionOrientation
in interfaceRotatable
-
getOrientationAsAngle
public final int getOrientationAsAngle()
Description copied from interface:Rotatable
Gets the current orientation as an angle.- Specified by:
getOrientationAsAngle
in interfaceRotatable
-
isFacing
public boolean isFacing(Locatable locatable)
Description copied from interface:Rotatable
Checks if this rotatable entity is facing a locatable object
-
isMoving
public final boolean isMoving()
Description copied from interface:Actor
Gets whether or not the actor is moving across the world graph
-
getHealthGauge
@Nullable public final @Nullable CombatGauge getHealthGauge()
The health gauge displayed during combat- Specified by:
getHealthGauge
in interfaceActor
- Returns:
- The health gauge if visible, else null
-
getDialogue
@Nullable public final @Nullable java.lang.String getDialogue()
Description copied from interface:Actor
Gets the dialogue above an actors head- Specified by:
getDialogue
in interfaceActor
- Returns:
- The actors current dialogue, otherwise null
-
getTarget
@Nullable public final @Nullable Actor getTarget()
Description copied from interface:Actor
Gets the Actor that this Actor is targeting (talking, attacking, trading, pickpocketing, etc)
-
getSpotAnimationIds
@NonNull public @NonNull java.util.List<java.lang.Integer> getSpotAnimationIds()
Description copied from interface:Actor
Gets a list of the spot animation ids of the entity. A spot animation is a model that is animated simultaneously with the actor's model.- Specified by:
getSpotAnimationIds
in interfaceActor
-
getPosition
@Nullable public final @Nullable Coordinate getPosition(Coordinate regionBase)
Description copied from interface:LocatableEntity
Gets the position using the region base as the coordinate to offset from. For optimization.- Specified by:
getPosition
in interfaceLocatableEntity
- Parameters:
regionBase
- The Coordinate base of the loaded region
-
getHighPrecisionPosition
public Coordinate.HighPrecision getHighPrecisionPosition(Coordinate regionBase)
Description copied from interface:LocatableEntity
Gets the high precision position using the region base as the coordinate to offset from. For optimization.- Specified by:
getHighPrecisionPosition
in interfaceLocatableEntity
- Parameters:
regionBase
- The Coordinate base of the loaded region
-
getHitsplats
@NonNull public @NonNull java.util.List<Hitsplat> getHitsplats()
- Specified by:
getHitsplats
in interfaceActor
-
getServerPosition
public Coordinate getServerPosition()
Description copied from interface:Actor
Gets the position of the actor according to the server.This value is typically ahead of where the client renders.
- Specified by:
getServerPosition
in interfaceActor
-
getPath
@NonNull public @NonNull java.util.List<Coordinate> getPath()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classOSRSEntity
-
-