Package games.stendhal.client.entity
Class Player
java.lang.Object
games.stendhal.client.entity.Entity
games.stendhal.client.entity.ActiveEntity
games.stendhal.client.entity.RPEntity
games.stendhal.client.entity.Player
- All Implemented Interfaces:
IEntity,RPObjectChangeListener
- Direct Known Subclasses:
User
A Player entity.
-
Nested Class Summary
Nested classes/interfaces inherited from class games.stendhal.client.entity.RPEntity
RPEntity.Resolution -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final games.stendhal.client.entity.PropertyAway property.static final games.stendhal.client.entity.PropertyGrumpy property.static final games.stendhal.client.entity.PropertyPlayer killer property.Fields inherited from class games.stendhal.client.entity.RPEntity
OUTFIT_UNSET, PROP_ADMIN_LEVEL, PROP_ATTACK, PROP_CONFUSED, PROP_EATING, PROP_GHOSTMODE, PROP_GROUP_MEMBERSHIP, PROP_HEALER, PROP_HEAVY, PROP_HP_DISPLAY, PROP_HP_RATIO, PROP_MERCHANT, PROP_OUTFIT, PROP_POISONED, PROP_PRODUCER, PROP_SHOCK, PROP_TEXT_INDICATORS, PROP_TITLE_TYPE, PROP_ZOMBIEFields inherited from class games.stendhal.client.entity.ActiveEntity
PROP_DIRECTION, PROP_SPEEDFields inherited from class games.stendhal.client.entity.Entity
clazz, inAdd, name, rpObject, title, type, x, yFields inherited from interface games.stendhal.client.entity.IEntity
PROP_ANIMATED, PROP_CLASS, PROP_NAME, PROP_POSITION, PROP_SIZE, PROP_STATE, PROP_TITLE, PROP_VISIBILITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgetAway()Get the away message.booleanisAway()Determine if the player is away.booleanisBadBoy()booleanisGrumpy()Determine if the player is grumpy.protected voidAn away message was set/cleared.voidonChangedAdded(RPObject object, RPObject changes) The object added/changed attribute(s).voidonChangedRemoved(RPObject object, RPObject changes) The object removed attribute(s).protected voidonPosition(double x, double y) When the entity's position changed.voidCalled when entity says something.protected voidplayRandomSoundFromCategory(String groupName, String categoryName) protected voidplayRandomSoundFromGroup(String groupName, String categoryName, long waitTimeInMilliSec) protected voidplaySoundFromCategory(String groupName, String categoryName) protected voidplaySoundFromCategory(String groupName, String categoryName, int index) Methods inherited from class games.stendhal.client.entity.RPEntity
addTextIndicator, castsShadow, getAdminLevel, getAtk, getAtkItem, getAtkXP, getAttackers, getAttackTarget, getBaseHP, getBaseMana, getDef, getDefItem, getDefXP, getExtOutfit, getHpRatio, getMana, getOldOutfitCode, getOutfit, getRatk, getRatkItem, getRatkXP, getResistance, getResolution, getShadowStyle, getShownDamageType, getShownWeapon, getTextIndicators, getTitle, getTitleType, getXP, hasStatus, ignoresCollision, initialize, isAttackedBy, isAttacking, isBeingAttacked, isChoking, isConfused, isDefending, isDoingRangedAttack, isEating, isGhostMode, isInHearingRange, isInHearingRange, onAttackPerformed, onBlocked, onDamaged, onHealed, onLevelChanged, onMissed, onPrivateListen, onReachAchievement, onTalk, release, showHPBar, showTitle, updateMethods inherited from class games.stendhal.client.entity.ActiveEntity
getDirection, isFlying, processPositioning, stoppedMethods inherited from class games.stendhal.client.entity.Entity
addChangeListener, addContentChangeListener, fireChange, getArea, getCursor, getEntityClass, getEntitySubclass, getHeight, getID, getName, getObjectID, getPath, getResistance, getRPObject, getSlot, getType, getVisibility, getWidth, getX, getY, isObstacle, isOnGround, isUser, onAdded, onRemoved, onSlotAdded, onSlotChangedAdded, onSlotChangedRemoved, onSlotRemoved, removeChangeListener, removeContentChangeListener, toString
-
Field Details
-
PROP_AWAY
public static final games.stendhal.client.entity.Property PROP_AWAYAway property. -
PROP_GRUMPY
public static final games.stendhal.client.entity.Property PROP_GRUMPYGrumpy property. -
PROP_PLAYER_KILLER
public static final games.stendhal.client.entity.Property PROP_PLAYER_KILLERPlayer killer property.
-
-
Constructor Details
-
Player
public Player()Create a player entity.
-
-
Method Details
-
isAway
public boolean isAway()Determine if the player is away.- Returns:
trueif the player is away.
-
isBadBoy
public boolean isBadBoy() -
getAway
Get the away message.- Returns:
- The away text, or
nullif not away.
-
onAway
An away message was set/cleared.- Parameters:
message- The away message, ornullif no-longer away.
-
isGrumpy
public boolean isGrumpy()Determine if the player is grumpy.- Returns:
trueif the player is grumpy.
-
onTalk
Description copied from class:RPEntityCalled when entity says something. -
onChangedAdded
The object added/changed attribute(s).- Specified by:
onChangedAddedin interfaceRPObjectChangeListener- Overrides:
onChangedAddedin classRPEntity- Parameters:
object- The base object.changes- The changes.
-
onChangedRemoved
The object removed attribute(s).- Specified by:
onChangedRemovedin interfaceRPObjectChangeListener- Overrides:
onChangedRemovedin classRPEntity- Parameters:
object- The base object.changes- The changes.
-
addSounds
-
onPosition
protected void onPosition(double x, double y) Description copied from class:EntityWhen the entity's position changed.- Overrides:
onPositionin classEntity- Parameters:
x- The new X coordinate.y- The new Y coordinate.
-
playRandomSoundFromCategory
-
playRandomSoundFromGroup
-
playSoundFromCategory
-
playSoundFromCategory
-