public interface Minigame extends ComponentOwner
Modifier and Type | Method and Description |
---|---|
Arena |
createArena(java.lang.String id,
Location3D spawnPoint,
Boundary boundary)
|
Arena |
createArena(java.lang.String id,
java.lang.String name,
Location3D spawnPoint,
Boundary boundary)
|
com.google.common.base.Optional<Arena> |
getArena(java.lang.String arenaId)
|
com.google.common.collect.ImmutableList<Arena> |
getArenas()
|
com.google.common.base.Optional<Challenger> |
getChallenger(java.util.UUID uuid)
Gets the
Challenger by the given UUID. |
com.google.common.collect.ImmutableList<Challenger> |
getChallengers()
|
<T> T |
getConfigValue(ConfigNode<T> node)
Gets the current value of the given
ConfigNode for this
Minigame . |
com.google.common.eventbus.EventBus |
getEventBus()
Gets this
Minigame 's EventBus . |
java.lang.String |
getPlugin()
Gets the name or ID of the plugin to which this
Minigame belongs. |
com.google.common.collect.ImmutableList<Round> |
getRounds()
|
void |
removeArena(Arena arena)
|
void |
removeArena(java.lang.String id)
|
<T> void |
setConfigValue(ConfigNode<T> node,
T value)
Gets the current value of the given
ConfigNode for this
Minigame . |
java.lang.String getPlugin()
Minigame
belongs.Minigame
belongs.com.google.common.eventbus.EventBus getEventBus()
Minigame
's EventBus
.Minigame
's EventBus
.<T> T getConfigValue(ConfigNode<T> node)
ConfigNode
for this
Minigame
.
If node
is an instance of a
RoundConfigNode
, value
will
be used as a default return value for
Round.getConfigValue(RoundConfigNode)
when not set for an
individual Round
.
T
- The value type associated with node
node
- The ConfigNode
to look upnode
for this Minigame
<T> void setConfigValue(ConfigNode<T> node, T value)
ConfigNode
for this
Minigame
.
If node
is an instance of a
RoundConfigNode
, value
will
be used as a default return value for
Round.getConfigValue(RoundConfigNode)
when not set for an
individual Round
.
T
- The value type associated with node
node
- The ConfigNode
to look upvalue
- The new value of node
for this Minigame
com.google.common.collect.ImmutableList<Arena> getArenas()
com.google.common.base.Optional<Arena> getArena(java.lang.String arenaId)
Arena createArena(java.lang.String id, java.lang.String name, Location3D spawnPoint, Boundary boundary) throws java.lang.IllegalArgumentException
Arena
within this Minigame
with
the given identifier, name, and initial spawn point.id
- The identifier of the new Arena
(will be converted to
lowercase)name
- The "friendly" name of this Arena
(i.e. the one
displayed to users)spawnPoint
- The initial spawn point for the new Arena
boundary
- The Boundary
of the new Arena
Arena
java.lang.IllegalArgumentException
- If an Arena
with the given
identifier already exists, or if spawnPoint
does not contain
a worldArena createArena(java.lang.String id, Location3D spawnPoint, Boundary boundary) throws java.lang.IllegalArgumentException
Arena
within this Minigame
with
the given identifier and initial spawn point.id
- The identifier of the new Arena
(will be converted to
lowercase, although the display name will retain the original case)spawnPoint
- The initial spawn point for the new Arena
boundary
- The Boundary
of the new Arena
Arena
java.lang.IllegalArgumentException
- If an Arena
with the given
identifier already exists, or if spawnPoint
does not contain
a worldvoid removeArena(java.lang.String id) throws java.lang.IllegalArgumentException
Arena
with the given ID from this Minigame
.
Note that calling this method will orphan the Arena
object
associated with the passed ID, causing all of its methods to throw
OrphanedComponentException
s.
void removeArena(Arena arena) throws java.lang.IllegalArgumentException
Arena
with the given ID from this Minigame
.
Note that calling this method will orphan the passed Arena
object, causing all of its methods to throw
OrphanedComponentException
s.
com.google.common.collect.ImmutableList<Round> getRounds()
com.google.common.collect.ImmutableList<Challenger> getChallengers()
ImmutableList
containing all active
Challenger
s owned by this Minigame
.com.google.common.base.Optional<Challenger> getChallenger(java.util.UUID uuid)
Challenger
by the given UUID.uuid
- The UUID to look upChallenger
by the given UUID