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
Modifier and TypeClassDescriptionprotected class
A 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
ConstructorDescriptionCreates a new StoredChest.StoredChest(RPObject rpobject)
Creates a StoredChest based on an existing RPObject. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks if it should close the chestvoid
close()
Close the chest.getDescriptionName(boolean definite)
Returns the name or something that can be used to identify the entity for the player.void
onRemoved(StendhalRPZone zone)
Called when this object is being removed from a zone.void
open()
Open the chest.Methods inherited from class games.stendhal.server.entity.mapstuff.chest.Chest
add, describe, generateRPClass, getContent, isOpen, onUsed, size, update
Methods 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, stopped
Methods 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, writeToJson
Methods inherited from class marauroa.common.game.SlotOwner
deserializeRPSlots, fill, serializeRPSlots
Methods 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, toAttributeString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:Chest
Open the chest. -
close
public void close()Description copied from class:Chest
Close the chest. -
getDescriptionName
Description copied from class:Entity
Returns the name or something that can be used to identify the entity for the player.- Overrides:
getDescriptionName
in 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:
true
if it should be called again.
-
onRemoved
Description copied from class:Entity
Called when this object is being removed from a zone.
-