Class StoredChest
java.lang.Object
marauroa.common.game.Attributes
marauroa.common.game.SlotOwner
marauroa.common.game.RPObject
games.stendhal.server.entity.Entity
games.stendhal.server.entity.mapstuff.chest.Chest
games.stendhal.server.entity.mapstuff.chest.StoredChest
- All Implemented Interfaces:
UseListener,Killer,Cloneable,Iterable<String>,Serializable
A Chest whose contents are stored by the zone.
- Author:
- kymara
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA listener for closing the chestNested classes/interfaces inherited from class marauroa.common.game.RPObject
RPObject.ID -
Field Summary
Fields inherited from class marauroa.common.game.RPObject
INVALID_ID -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new StoredChest.StoredChest(RPObject rpobject) Creates a StoredChest based on an existing RPObject. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanChecks if it should close the chestvoidclose()Close the chest.getDescriptionName(boolean definite) Returns the name or something that can be used to identify the entity for the player.voidonRemoved(StendhalRPZone zone) Called when this object is being removed from a zone.voidopen()Open the chest.Methods inherited from class games.stendhal.server.entity.mapstuff.chest.Chest
add, describe, generateRPClass, getContent, isOpen, onUsed, size, updateMethods inherited from class games.stendhal.server.entity.Entity
getAdjacentNodes, getArea, getArea, getCursor, getDescription, getEntitySlot, getHeight, getName, getOrigin, getResistance, getResistance, getTitle, getWidth, getX, getY, getZone, hasDescription, isInSight, isObstacle, nextTo, nextTo, notifyWorldAboutChanges, onAdded, onMoved, setCursor, setDescription, setEntityClass, setEntitySubclass, setMenu, setPosition, setResistance, setSize, setVisibility, slotIterator, slots, squaredDistance, squaredDistance, stoppedMethods inherited from class marauroa.common.game.RPObject
addEvent, addLink, addLink, addMap, addSlot, addSlot, applyDifferences, clearEvents, clearVisible, clone, containsKey, equals, events, eventsIterator, fill, get, getBaseContainer, getBoolean, getContainer, getContainerBaseOwner, getContainerOwner, getContainerSlot, getDifferences, getDouble, getFromSlots, getID, getInt, getLink, getLinkedObject, getMap, getSlot, has, hashCode, hasLink, hasMap, hasSlot, hide, isContained, isEmpty, isHidden, isStorable, maps, put, put, put, put, readObject, remove, removeLink, removeMap, removeSlot, resetAddedAndDeleted, resetAddedAndDeletedMaps, resetAddedAndDeletedRPLink, resetAddedAndDeletedRPSlot, setAddedMaps, setAddedRPSlot, setContainer, setDeletedMaps, setDeletedRPSlot, setID, slots, slotsIterator, store, toString, unhide, unstore, writeObject, writeObject, writeToJsonMethods inherited from class marauroa.common.game.SlotOwner
deserializeRPSlots, fill, serializeRPSlotsMethods inherited from class marauroa.common.game.Attributes
add, applyDifferences, get, getBool, getDouble, getInt, getList, getLong, getRPClass, has, instanceOf, iterator, put, put, put, put, put, readFromMap, remove, resetAddedAndDeletedAttributes, setAddedAttributes, setDeletedAttributes, setRPClass, setRPClass, toAttributeStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StoredChest
public StoredChest()Creates a new StoredChest. -
StoredChest
Creates a StoredChest based on an existing RPObject. This is just for loading a chest from the database, use the other constructors.- Parameters:
rpobject-
-
-
Method Details
-
open
public void open()Description copied from class:ChestOpen the chest. -
close
public void close()Description copied from class:ChestClose the chest. -
getDescriptionName
Description copied from class:EntityReturns the name or something that can be used to identify the entity for the player.- Overrides:
getDescriptionNamein classChest- Parameters:
definite- true for "the" and false for "a/an" in case the entity has no name- Returns:
- name
-
chestCloser
protected boolean chestCloser()Checks if it should close the chest- Returns:
trueif it should be called again.
-
onRemoved
Description copied from class:EntityCalled when this object is being removed from a zone.
-