Class ZoneAttributes
java.lang.Object
games.stendhal.server.core.engine.ZoneAttributes
A container for arbitrary map attributes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the current value of an attribute.getZone()
Get the zone where these attributes belong to.void
Set an attribute.void
Set all attributes.void
Remove an attribute.void
setBaseName(String name)
Set the base name of the layers in the zone.
-
Constructor Details
-
ZoneAttributes
Create new ZoneAttributes.- Parameters:
zone
- the zone for which the attribute set is created
-
-
Method Details
-
setBaseName
Set the base name of the layers in the zone. Normally you do not need to call this, as the name is got from the zone. Setting it is necessary if the zone name does not match the base name of the tile layers, as is in the case of special zones like the bank vault. For those zones the base name comes from the parent zone used to create the special zone, and the name must be set to the same for the attributes layer.- Parameters:
name
- base zone name
-
getZone
Get the zone where these attributes belong to.- Returns:
- zone
-
put
Set an attribute.- Parameters:
key
-value
-
-
get
Get the current value of an attribute.- Parameters:
key
- attribute key- Returns:
- attribute value, or
null
if the attribute is not set
-
remove
Remove an attribute.- Parameters:
key
- attribute name
-
putAll
Set all attributes.- Parameters:
map
- map of attributes
-