public interface Arena extends MetadataHolder, ComponentOwner, Component<Minigame>
Modifier and Type | Method and Description |
---|---|
int |
addSpawnPoint(Location3D spawn)
Adds the given
Location3D to this Arena 's possible
spawn points. |
com.google.common.base.Optional<ChallengerListingLobbySign> |
createChallengerListingLobbySign(Location3D location,
int index)
Attempts to register a
ChallengerListingLobbySign at the given
location . |
Round |
createRound()
|
Round |
createRound(com.google.common.collect.ImmutableSet<LifecycleStage> stages)
|
com.google.common.base.Optional<StatusLobbySign> |
createStatusLobbySign(Location3D location)
Attempts to register a
StatusLobbySign at the given
location . |
Boundary |
getBoundary()
|
java.lang.String |
getId()
Gets the identifier of this
Arena . |
com.google.common.base.Optional<LobbySign> |
getLobbySignAt(Location3D location)
Gets the
LobbySign at the given Location3D , if present. |
com.google.common.collect.ImmutableList<LobbySign> |
getLobbySigns()
|
Minigame |
getMinigame()
|
java.lang.String |
getName()
Gets the "friendly" name of this
Arena , as displayed to users. |
com.google.common.base.Optional<Round> |
getRound()
|
com.google.common.collect.ImmutableMap<java.lang.Integer,Location3D> |
getSpawnPoints()
Returns an
ImmutableMap of points at which players may spawn
upon entering this arena, mapped to their respective IDs. |
java.lang.String |
getWorld()
Gets the name of the world which contains this
Arena . |
void |
removeSpawnPoint(int index)
Removes the spawn point of the given index from this
Arena . |
void |
removeSpawnPoint(Location3D location)
Removes the spawn point(s) at the given location from this
Arena . |
void |
rollback()
|
void |
setBoundary(Boundary bound)
|
getMetadata
Minigame getMinigame() throws OrphanedComponentException
Minigame
this Arena
is owned byOrphanedComponentException
- If this object is orphaned (see
Component
for details)java.lang.String getId() throws OrphanedComponentException
Arena
.Arena
OrphanedComponentException
- If this object is orphaned (see
Component
for details)java.lang.String getName() throws OrphanedComponentException
Arena
, as displayed to users.Arena
, as displayed to users,
or its ID if one is not setOrphanedComponentException
- If this object is orphaned (see
Component
for details)java.lang.String getWorld() throws OrphanedComponentException
Arena
.Arena
OrphanedComponentException
- If this object is orphaned (see
Component
for details)Boundary getBoundary() throws OrphanedComponentException
Boundary
which this Arena
is containedOrphanedComponentException
- If this object is orphaned (see
Component
for details)
withinvoid setBoundary(Boundary bound) throws OrphanedComponentException
bound
- The new Boundary
which this Arena
is to be
contained withinOrphanedComponentException
- If this object is orphaned (see
Component
for details)com.google.common.collect.ImmutableMap<java.lang.Integer,Location3D> getSpawnPoints() throws OrphanedComponentException
ImmutableMap
of points at which players may spawn
upon entering this arena, mapped to their respective IDs.BiMap
of points at which players may spawn
upon entering this arena, mapped to their respective IDsOrphanedComponentException
- If this object is orphaned (see
Component
for details)int addSpawnPoint(Location3D spawn) throws OrphanedComponentException
Location3D
to this Arena
's possible
spawn points.spawn
- The Location3D
to add as a new spawn pointOrphanedComponentException
- If this object is orphaned (see
Component
for details)void removeSpawnPoint(int index) throws OrphanedComponentException
Arena
.index
- The index of the spawn point to removejava.lang.IllegalArgumentException
- If a spawn point at the given index does
not existOrphanedComponentException
- If this object is orphaned (see
Component
for details)void removeSpawnPoint(Location3D location) throws OrphanedComponentException
Arena
.location
- The location of the spawn point(s) to removejava.lang.IllegalArgumentException
- If no spawn points are defined at the
given locationOrphanedComponentException
- If this object is orphaned (see
Component
for details)com.google.common.base.Optional<Round> getRound() throws OrphanedComponentException
Round
contained by this Arena
OrphanedComponentException
- If this object is orphaned (see
Component
for details)Round createRound(com.google.common.collect.ImmutableSet<LifecycleStage> stages) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OrphanedComponentException
stages
- A LinkedHashSet
containing LifecycleStage
s
to define for the new Round
Round
.java.lang.IllegalArgumentException
- If stages
contains an empty
setjava.lang.IllegalStateException
- If a Round
already exists in this
Arena
OrphanedComponentException
- If this object is orphaned (see
Component
for details)Round createRound() throws java.lang.IllegalStateException, OrphanedComponentException
Round
.java.lang.IllegalStateException
- If a Round
already exists in this
Arena
, or if the default LifecycleStage
s have not
been set as a config optionOrphanedComponentException
- If this object is orphaned (see
Component
for details)com.google.common.collect.ImmutableList<LobbySign> getLobbySigns() throws OrphanedComponentException
ImmutableList
of LobbySign
s registered for
this Arena
OrphanedComponentException
- If this object is orphaned (see
Component
for details)com.google.common.base.Optional<LobbySign> getLobbySignAt(Location3D location) throws java.lang.IllegalArgumentException, OrphanedComponentException
LobbySign
at the given Location3D
, if present.location
- The location
at which to search for a
LobbySign
LobbySign
at the given Location3D
, or
Optional.absent()
if none is registeredjava.lang.IllegalArgumentException
- If location
does not define a worldOrphanedComponentException
- If this object is orphaned (see
Component
for details)com.google.common.base.Optional<StatusLobbySign> createStatusLobbySign(Location3D location) throws java.lang.IllegalArgumentException, OrphanedComponentException
StatusLobbySign
at the given
location
.location
- The location
to register the sign atStatusLobbySign
, or
Optional.absent()
if the passed location does not contain a
sign type or already contains a registered LobbySign
java.lang.IllegalArgumentException
- If location
does not define a worldOrphanedComponentException
- If this object is orphaned (see
Component
for details)com.google.common.base.Optional<ChallengerListingLobbySign> createChallengerListingLobbySign(Location3D location, int index) throws java.lang.IllegalArgumentException, OrphanedComponentException
ChallengerListingLobbySign
at the given
location
.location
- The location
to register the sign atindex
- The index of the sign (see
ChallengerListingLobbySign.getIndex()
for more infoStatusLobbySign
, or
Optional.absent()
if the passed location does not contain a
sign type or already contains a registered LobbySign
java.lang.IllegalArgumentException
- If location
does not define a worldOrphanedComponentException
- If this object is orphaned (see
Component
for details)void rollback() throws java.lang.IllegalStateException, OrphanedComponentException
java.lang.IllegalStateException
- If no Round
has taken place in this
Arena
since the last call to this method upon itOrphanedComponentException
- If this object is orphaned (see
Component
for details)