Class MoveableObject
java.lang.Object
games.stendhal.server.actions.equip.MoveableObject
source or destination object.
- Author:
- hendrik
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckClass(List<Class<?>> validClasses) Checks if RPobject is one the valid classes.abstract booleancheckDistance(Entity entity, double distance) is the owner of the slot in reach?abstract String[]returns log information.booleanChecks if container is a corpse.abstract booleanisValid()is this object valid?
-
Field Details
-
parent
optional, parent item . -
slot
the slot this item is in or should be placed into. -
player
Player to notify about problems.
-
-
Constructor Details
-
MoveableObject
Creates a new MoveableObject.- Parameters:
player- Player to notify about problems
-
-
Method Details
-
isValid
public abstract boolean isValid()is this object valid?- Returns:
- true, if the action may be performed, false otherwise
-
checkDistance
is the owner of the slot in reach?- Parameters:
entity- entity to compare todistance- max distance- Returns:
- true, if it is reachable, false otherwise
-
getLogInfo
returns log information.- Returns:
- String[2]
-
checkClass
Checks if RPobject is one the valid classes.- Parameters:
validClasses-- Returns:
- true if the rpobject is one of the classes in validClasses.
-
isContainerCorpse
public boolean isContainerCorpse()Checks if container is a corpse.- Returns:
- true if container is a corpse.
-