Class EntitySlot
java.lang.Object
marauroa.common.game.RPSlot
games.stendhal.server.entity.slot.EntitySlot
- All Implemented Interfaces:
Slot,Cloneable,Iterable<RPObject>,Serializable
- Direct Known Subclasses:
ContainerItemSlot,GroundSlot,KeyedSlot,LootableSlot,PlayerSlot,TradeCenterMarketSlot
Stendhal specific information about this slot.
- Author:
- hendrik
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an uninitialized EntitySlot.EntitySlot(String name, String contentSlotName) Creates a new EntitySlot. -
Method Summary
Modifier and TypeMethodDescriptionvoidclears the last error messagegets the slot name for the item checkgets the last error messagegets the type of the slot ("slot", "ground", "market")booleanCan this slot contain items?booleanIs this slot reachable to take things out of?booleanIs this slot reachable to put things into?booleandoes this slot require that the bounding of items is check on adding itemsprotected voidsetErrorMessage(String errorMessage) sets the error messageMethods inherited from class marauroa.common.game.RPSlot
add, add, addPreservingId, clear, clearVisible, clone, equals, get, getCapacity, getFirst, getName, getOwner, has, hasAsAncestor, hasAsAncestor, hashCode, isEmpty, isFull, iterator, readObject, remove, resetAddedAndDeletedRPObjects, setAddedRPObject, setCapacity, setDeletedRPObject, setName, size, toString, writeObject, writeObject, writeToJsonMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
EntitySlot
public EntitySlot()Creates an uninitialized EntitySlot. -
EntitySlot
Creates a new EntitySlot.- Parameters:
name- name of slotcontentSlotName- name of slot used by the "item may be put in" check
-
-
Method Details
-
isReachableForTakingThingsOutOfBy
Description copied from interface:SlotIs this slot reachable to take things out of?- Specified by:
isReachableForTakingThingsOutOfByin interfaceSlot- Parameters:
entity- Entity which may be able to reach this slot- Returns:
- true, if it is reachable, false otherwise
-
isReachableForThrowingThingsIntoBy
Description copied from interface:SlotIs this slot reachable to put things into?- Specified by:
isReachableForThrowingThingsIntoByin interfaceSlot- Parameters:
entity- Entity which may be able to reach this slot- Returns:
- true, if it is reachable, false otherwise
-
isItemSlot
public boolean isItemSlot()Description copied from interface:SlotCan this slot contain items?- Specified by:
isItemSlotin interfaceSlot- Returns:
- true, if it can contains items, false otherwise
-
isTargetBoundCheckRequired
public boolean isTargetBoundCheckRequired()Description copied from interface:Slotdoes this slot require that the bounding of items is check on adding items- Specified by:
isTargetBoundCheckRequiredin interfaceSlot- Returns:
- true, if bound items have to be checked, false otherwise
-
setErrorMessage
sets the error message- Parameters:
errorMessage- error message to set
-
getErrorMessage
gets the last error message- Returns:
- error message or
null
-
clearErrorMessage
public void clearErrorMessage()clears the last error message -
getContentSlotName
gets the slot name for the item check- Returns:
- slot name
-
getSlotType
gets the type of the slot ("slot", "ground", "market")- Returns:
- slot type
-