public class ArenaFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
ArenaFactory |
addSpawn(double x,
double y,
double z)
Adds a spawn to the given arena with the given coordinates.
|
ArenaFactory |
addSpawn(double x,
double y,
double z,
float pitch,
float yaw)
Adds a spawn to the given arena with the given coordinates, pitch, and
yaw.
|
ArenaFactory |
addSpawn(org.bukkit.Location location)
Deprecated.
|
ArenaFactory |
addSpawn(Location3D location)
Adds a spawn to the given arena with the given
Location . |
ArenaFactory |
addSpawn(Location3D location,
boolean saveOrientation)
Adds a spawn to the given arena with the given
Location3D . |
ArenaFactory |
addSpawn(org.bukkit.Location location,
boolean saveOrientation)
Deprecated.
|
static ArenaFactory |
createArenaFactory(java.lang.String plugin,
java.lang.String arena,
java.lang.String world)
Creates a new
arena object, used to modify an
arena's assets. |
ArenaFactory |
deleteSpawn(double x,
double y,
double z)
Deletes a spawn from the given arena at the given coordinates.
|
ArenaFactory |
deleteSpawn(int index)
Deletes a spawn from the given arena at the given
Location . |
ArenaFactory |
deleteSpawn(org.bukkit.Location location)
Deprecated.
|
ArenaFactory |
deleteSpawn(Location3D location)
Deletes a spawn from the given arena at the given
Location3D . |
void |
destroy()
Destroys this arena factory.
|
java.lang.String |
getArena()
Retrieves the name of the arena associated with this
ArenaFactory . |
java.lang.String |
getDisplayName()
Retrieves the display name of the arena associated with this
ArenaFactory . |
java.lang.String |
getPlugin()
Retrieves the name of the plugin associated with this
ArenaFactory . |
java.lang.String |
getWorld()
Retrieves the name of the world associated with this
ArenaFactory 's arena. |
boolean |
isNewArena()
Determines whether this arena is newly created.
|
boolean |
isNewInstance()
Determines whether this instance is newly created for the server session.
|
ArenaFactory |
setData(java.lang.String key,
java.lang.Object value)
Attaches an arbitrary key-value pair to the arena.
|
ArenaFactory |
setMaxBound(double x,
double y,
double z)
Sets the maximum boundary of this arena.
|
ArenaFactory |
setMaxBound(org.bukkit.Location location)
Deprecated.
|
ArenaFactory |
setMaxBound(Location3D location)
Sets the maximum boundary of this arena.
|
ArenaFactory |
setMinBound(double x,
double y,
double z)
Sets the minimum boundary of this arena.
|
ArenaFactory |
setMinBound(org.bukkit.Location location)
Deprecated.
|
ArenaFactory |
setMinBound(Location3D location)
Sets the minimum boundary of this arena.
|
public static ArenaFactory createArenaFactory(java.lang.String plugin, java.lang.String arena, java.lang.String world)
arena
object, used to modify an
arena's assets.plugin
- the plugin this arena is owned byarena
- the name of the arenaworld
- the world containing the arenapublic java.lang.String getPlugin()
ArenaFactory
.ArenaFactory
public java.lang.String getArena()
ArenaFactory
.ArenaFactory
public java.lang.String getDisplayName()
ArenaFactory
.ArenaFactory
public java.lang.String getWorld()
ArenaFactory
's arena.ArenaFactory
's
arenapublic ArenaFactory addSpawn(double x, double y, double z, float pitch, float yaw)
x
- the x-coordinate of the new spawny
- the y-coordinate of the new spawnz
- the z-coordinate of the new spawnpitch
- the pitch (x- and z-rotation) of the new spawnyaw
- the yaw (y-rotation) of the new spawnArenaFactory
which this method was called
frompublic ArenaFactory addSpawn(double x, double y, double z)
Note: it is recommended that you use addSpawn(Location)
if an instance of a
Location at these coordinates already exists.
x
- the x-coordinate of the new spawny
- the y-coordinate of the new spawnz
- the z-coordinate of the new spawnArenaFactory
which this method was called
frompublic ArenaFactory addSpawn(Location3D location, boolean saveOrientation) throws InvalidLocationException
Location3D
.location
- the location of the new spawnsaveOrientation
- whether to save the Location3D
's pitch and
yaw to the spawn (Defaults to false if omitted).ArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's world@Deprecated public ArenaFactory addSpawn(org.bukkit.Location location, boolean saveOrientation) throws InvalidLocationException
addSpawn(Location3D, boolean)
Location
.location
- the location of the new spawnsaveOrientation
- whether to save the Location
's pitch and
yaw to the spawn (Defaults to false if omitted).ArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's worldpublic ArenaFactory addSpawn(Location3D location) throws InvalidLocationException
Location
.location
- the location of the new spawnArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's world@Deprecated public ArenaFactory addSpawn(org.bukkit.Location location) throws InvalidLocationException
addSpawn(Location3D)
Location
.location
- the location of the new spawnArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's worldpublic ArenaFactory deleteSpawn(double x, double y, double z)
x
- the x-coordinate of the spawn to deletey
- the y-coordinate of the spawn to deletez
- the z-coordinate of the spawn to deleteArenaFactory
which this method was called
frompublic ArenaFactory deleteSpawn(Location3D location)
Location3D
.location
- the Location3D
of the spawn to deleteArenaFactory
which this method was called
from@Deprecated public ArenaFactory deleteSpawn(org.bukkit.Location location)
deleteSpawn(Location3D)
Location
.location
- the Location
of the spawn to deleteArenaFactory
which this method was called
frompublic ArenaFactory deleteSpawn(int index)
Location
.index
- the internal index of the spawn to deleteArenaFactory
which this method was called
frompublic ArenaFactory setMinBound(double x, double y, double z)
x
- the minimum x-valuey
- the minimum y-valuez
- the minimum z-valueArenaFactory
which this method was called
frompublic ArenaFactory setMinBound(Location3D location) throws InvalidLocationException
location
- the Location3D
representing the maximum boundaryArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's world@Deprecated public ArenaFactory setMinBound(org.bukkit.Location location) throws InvalidLocationException
setMinBound(Location3D)
location
- the Location
representing the maximum boundaryArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's worldpublic ArenaFactory setMaxBound(double x, double y, double z)
x
- the maximum x-valuey
- the maximum y-valuez
- the maximum z-valueArenaFactory
which this method was called
frompublic ArenaFactory setMaxBound(Location3D location) throws InvalidLocationException
location
- the Location3D
representing the maximum boundaryArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's world@Deprecated public ArenaFactory setMaxBound(org.bukkit.Location location) throws InvalidLocationException
setMinBound(Location3D)
location
- the Location
representing the maximum boundaryArenaFactory
which this method was called
fromInvalidLocationException
- if the provided location's world does
not match the arena's worldpublic ArenaFactory setData(java.lang.String key, java.lang.Object value)
key
- the key to set for the arenavalue
- the value to associate with the keyArenaFactory
which this method was called
frompublic boolean isNewInstance()
createArenaFactory()
method is called a second time.public boolean isNewArena()
public void destroy()