Class MoveableObject
java.lang.Object
games.stendhal.server.actions.equip.MoveableObject
source or destination object.
- Author:
- hendrik
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkClass(List<Class<?>> validClasses)
Checks if RPobject is one the valid classes.abstract boolean
checkDistance(Entity entity, double distance)
is the owner of the slot in reach?abstract String[]
returns log information.boolean
Checks if container is a corpse.abstract boolean
isValid()
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.
-