public class Spawnpoint extends Entity
| Modifier and Type | Class and Description |
|---|---|
static interface |
Spawnpoint.EntitySpawnedListener |
ANY_MESSAGE| Constructor and Description |
|---|
Spawnpoint() |
Spawnpoint(Direction direction) |
Spawnpoint(Direction direction,
java.lang.String spawnType) |
Spawnpoint(double x,
double y) |
Spawnpoint(int mapId,
double x,
double y) |
Spawnpoint(int mapId,
double x,
double y,
Direction direction) |
Spawnpoint(int mapId,
java.awt.geom.Point2D point) |
Spawnpoint(int mapId,
java.awt.geom.Point2D point,
Direction direction) |
| Modifier and Type | Method and Description |
|---|---|
Direction |
getDirection() |
java.lang.String |
getSpawnType() |
void |
onSpawned(Spawnpoint.EntitySpawnedListener listener) |
void |
removeSpawnedListener(Spawnpoint.EntitySpawnedListener listener) |
void |
setDirection(Direction direction) |
void |
setSpawnType(java.lang.String spawnType) |
boolean |
spawn(IEntity entity)
Spawns the specified entity to the
Environment of the Spawnpoint or the currently active Environment. |
actions, addController, addEntityRenderListener, addListener, addTag, addTransformListener, animations, attachControllers, behavior, canRender, detachControllers, getAngle, getBoundingBox, getCenter, getController, getControllers, getEnvironment, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, isLoaded, isVisible, loaded, onMessage, onMessage, onRendered, perform, register, removed, removeEntityRenderedListener, removeEntityRenderListener, removeListener, removeMessageListener, removeTag, removeTransformListener, rendered, rendering, renderWithLayer, sendMessage, setAngle, setController, setHeight, setLocation, setLocation, setMapId, setName, setRenderType, setRenderWithLayer, setSize, setVisible, setWidth, setX, setY, toStringpublic Spawnpoint()
public Spawnpoint(double x,
double y)
public Spawnpoint(int mapId,
double x,
double y)
public Spawnpoint(int mapId,
java.awt.geom.Point2D point)
public Spawnpoint(int mapId,
double x,
double y,
Direction direction)
public Spawnpoint(int mapId,
java.awt.geom.Point2D point,
Direction direction)
public Spawnpoint(Direction direction)
public Spawnpoint(Direction direction, java.lang.String spawnType)
public void onSpawned(Spawnpoint.EntitySpawnedListener listener)
public void removeSpawnedListener(Spawnpoint.EntitySpawnedListener listener)
public Direction getDirection()
public void setDirection(Direction direction)
public java.lang.String getSpawnType()
public void setSpawnType(java.lang.String spawnType)
public boolean spawn(IEntity entity)
Environment of the Spawnpoint or the currently active Environment.
Spawning will set the location of the entity to the location defined by the spawnpoint and optionally also set the angle of the entity, if a spawn direction is defined.
entity - The entity to spawn at the specified location.GameWorld.environment()