public class Region
extends java.lang.Object
implements java.io.Serializable
Regions have a name, a boundary (ordered list of points), a set of
region configs, and a set of properties. The region configs describe
the builtin region features applied to the region. The properties
are the NameValue properties defined in the WorldEditor. Custom
region triggers are called when the "onEnter" or "onLeave"
properties are set. See RegionTrigger
.
Modifier and Type | Class and Description |
---|---|
static class |
Region.Search
Region search parameters.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
DEFAULT_PRIORITY |
static ObjectType |
OBJECT_TYPE
Region object type.
|
static long |
PROP_ALL
Get all region information (search selection flag).
|
static long |
PROP_BOUNDARY
Get the region boundary (search selection flag).
|
static long |
PROP_PROPERTIES
Get the region properties (search selection flag).
|
Modifier and Type | Method and Description |
---|---|
void |
addConfig(RegionConfig config)
Add a region config (builtin region feature).
|
Boundary |
getBoundary()
Get the region boundary.
|
RegionConfig |
getConfig(java.lang.String type)
Get the region config by type.
|
java.util.Collection<RegionConfig> |
getConfigs()
Get all the region configs.
|
java.lang.String |
getName()
Get the region name.
|
java.lang.Integer |
getPriority()
Get the region priority.
|
java.io.Serializable |
getProperty(java.lang.String key)
Get property value.
|
java.util.Map<java.lang.String,java.io.Serializable> |
getPropertyMapRef()
Get the property map.
|
void |
setBoundary(Boundary b)
Set the region boundary.
|
void |
setName(java.lang.String name)
Set the region name.
|
void |
setPriority(java.lang.Integer priority)
Set the region priority.
|
void |
setProperties(java.util.Map<java.lang.String,java.io.Serializable> props)
Set the region property map.
|
java.io.Serializable |
setProperty(java.lang.String key,
java.io.Serializable value)
Set property value.
|
java.lang.String |
toString() |
public static java.lang.Integer DEFAULT_PRIORITY
public static final long PROP_BOUNDARY
public static final long PROP_PROPERTIES
public static final long PROP_ALL
public static final ObjectType OBJECT_TYPE
public java.lang.String toString()
toString
in class java.lang.Object
public void setName(java.lang.String name)
public java.lang.String getName()
public void setPriority(java.lang.Integer priority)
DEFAULT_PRIORITY
.public java.lang.Integer getPriority()
public void setBoundary(Boundary b)
public Boundary getBoundary()
public void addConfig(RegionConfig config)
public RegionConfig getConfig(java.lang.String type)
public java.util.Collection<RegionConfig> getConfigs()
public java.io.Serializable getProperty(java.lang.String key)
key
- Property namesetProperty(String, Serializable)
public java.io.Serializable setProperty(java.lang.String key, java.io.Serializable value)
key
- Property name.value
- Property value.public java.util.Map<java.lang.String,java.io.Serializable> getPropertyMapRef()
public void setProperties(java.util.Map<java.lang.String,java.io.Serializable> props)