public class ConfigManager
extends java.lang.Object
Constructor and Description |
---|
ConfigManager(java.lang.String plugin)
Creates a config manager for the given plugin.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areBlockPhysicsAllowed()
Retrieves whether block physics are permitted in worlds containing one or
more arenas.
|
boolean |
areEntityExplosionsAllowed()
Retrieves whether entity explosions are permitted in worlds containing
one or more arenas.
|
boolean |
areKitsAllowed()
Retrieves whether players are permitted to use the /kit command while
partaking in a minigame.
|
boolean |
arePMsAllowed()
Retrieves whether players partaking in a minigame are permitted to send
private messages or use the /pm command.
|
boolean |
areSpectatorsInTabList()
Retrieves whether spectators should be displayed on the tab list.
|
boolean |
areSpectatorsOnLobbySigns()
Retrieves whether spectators' names are displayed on lobby signs.
|
boolean |
getAllowJoinRoundInProgress()
Retrieves whether players are allowed to join a round which
has already started . |
boolean |
getAllowJoinRoundWhilePreparing()
Retrieves whether players are allowed to join a round which
is in its preparation stage . |
org.bukkit.Location |
getDefaultExitLocation()
Deprecated.
Depends on Bukkit
|
GameMode |
getDefaultGameMode()
Retrieves the default
gamemode for players entering
minigame rounds. |
java.lang.String |
getDefaultLocale()
Deprecated.
Obsolete since 0.5.0, as its value no longer affects anything
|
int |
getDefaultPlayingTime()
Retrieves the default time allotted to a round's
playing period (default: 300). |
int |
getDefaultPreparationTime()
Sets the default time allotted to a round's
preparation period (default: 90). |
org.bukkit.ChatColor |
getLobbyArenaColor()
Retrieves the color of the top line (the arena name) of a lobby sign.
|
org.bukkit.ChatColor |
getLobbyColorAttribute(java.lang.String key)
Retrieves a specific color attribute for lobby signs associated with this
manager's plugin.
|
java.util.HashMap<java.lang.String,org.bukkit.ChatColor> |
getLobbyColorAttributes()
Retrieves a copy of the hashmap containing all color attributes for lobby
signs associated with this manager's plugin.
|
org.bukkit.ChatColor |
getLobbyPlayerCountColor()
Retrieves the color of a lobby sign's player count when the round is not
full.
|
org.bukkit.ChatColor |
getLobbyPlayerCountFullColor()
Retrieves the color of a lobby sign's player count when the round is
full.
|
org.bukkit.ChatColor |
getLobbyPlayingColor()
Retrieves the color of a lobby sign's
PLAYING
status. |
org.bukkit.ChatColor |
getLobbyPreparingColor()
Retrieves the color of a lobby sign's
PREPARING
status. |
org.bukkit.ChatColor |
getLobbyResettingColor()
Retrieves the color of a lobby sign's
RESETTING
status. |
org.bukkit.ChatColor |
getLobbyTimeColor()
Retrieves the color of a lobby sign's timer when remaining time is
greater than 60 seconds.
|
org.bukkit.ChatColor |
getLobbyTimeInfiniteColor()
Retrieves the color of a lobby sign's timer when remaining time is
infinite.
|
org.bukkit.ChatColor |
getLobbyTimeWarningColor()
Retrieves the color of a lobby sign's timer when remaining time is less
than 60 seconds.
|
org.bukkit.ChatColor |
getLobbyWaitingColor()
Retrieves the color of a lobby sign's
WAITING
status. |
int |
getMaxPlayers()
Retrieves the default maximum number of players allowed in a
round at one time (default: 32). |
Minigame |
getMinigame()
Retrieves the
Minigame associated with this config manager. |
int |
getMinPlayers()
Retrieves the default minimum number of players required to automatically
start a
round . |
java.lang.Class<? extends MGPlayer> |
getPlayerClass()
Deprecated.
Use metadata instead.
|
java.lang.String |
getPlugin()
Retrieves the name of the plugin associated with this config manager.
|
java.lang.Class<? extends Round> |
getRoundClass()
Deprecated.
Use metadata instead.
|
java.lang.String |
getSignId()
Retrieves the associated plugin
lobby sign identifier,
used to recognize lobby signs. |
boolean |
getSpectateOnJoin()
Retrieves whether players will be set to spectator mode upon joining
around in progress.
|
boolean |
isBlockBreakAllowed()
Retrieves whether block breaking is permitted for players in a
round . |
boolean |
isBlockBurnAllowed()
Retrieves whether block burning is permitted in worlds containing one or
more arenas.
|
boolean |
isBlockFadeAllowed()
Retrieves whether block fading (e.g.
|
boolean |
isBlockFlowAllowed()
Retrieves whether block flowing is permitted in worlds containing one or
more arenas.
|
boolean |
isBlockGrowAllowed()
Retrieves whether block growing (e.g.
|
boolean |
isBlockIgniteAllowed()
Retrieves whether block ignition is permitted in worlds containing one or
more arenas.
|
boolean |
isBlockPhysicsAllowed()
Deprecated.
This method is improperly named, but remains for the sake of
reverse compatibility. You should instead use
areBlockPhysicsAllowed() . |
boolean |
isBlockPistonAllowed()
Retrieves whether pistons are permitted in worlds containing one or more
arenas.
|
boolean |
isBlockPlaceAllowed()
Retrieves whether block placing is permitted for players in a
round . |
boolean |
isBlockSpreadAllowed()
Retrieves whether block spreading (e.g.
|
boolean |
isDamageAllowed()
Retrieves whether players in rounds may receive damage.
|
boolean |
isEntityExplosionsAllowed()
Deprecated.
This method is improperly named, but remains for the sake of
reverse compatibility. You should instead use
areEntityExplosionsAllowed() . |
boolean |
isEntityTargetingEnabled()
Retrieves whether entities are permitted to target players in arenas.
|
boolean |
isHangingBreakAllowed()
Retrieves whether hanging entity (e.g.
|
boolean |
isHungerEnabled()
Retrieves whether hunger should drain from players in rounds.
|
boolean |
isItemFrameDamageAllowed()
Retrieves whether players in a minigame may remove the item from an item
frame by clicking on it.
|
boolean |
isMobSpawningAllowed()
Retrieves whether mob spawning is permitted in worlds containing an
arena.
|
boolean |
isOverrideDeathEvent()
Retrieves whether Bukkit's
PlayerDeathEvent will be overridden
for players participating in minigame rounds. |
boolean |
isPerRoundChatEnabled()
Retrieves whether chat should be handled on a per-round basis (e.g.
|
boolean |
isPvPAllowed()
Retrieves whether PvP is allowed by default.
|
boolean |
isRandomSpawning()
Retrieves whether players are sent to a random spawn when entered into an
arena.
|
boolean |
isRollbackEnabled()
Retrieves whether rollback is enabled by default.
|
boolean |
isSpectatorChatSeparate()
Retrieves whether spectators are placed in a separate chat channel from
active players.
|
boolean |
isSpectatorFlightAllowed()
Retrieves whether spectators are permitted to fly.
|
boolean |
isTeamChatEnabled()
Retrieves whether teams in a round should have separate chat channels.
|
boolean |
isTeamDamageAllowed()
Retrieves whether players are permitted to damage teammates.
|
boolean |
isTeleportationAllowed()
Retrieves whether teleportation (via ender pearl, command, or another
plugin) is permitted for players in a
round . |
boolean |
isUsingVanillaSpectating()
Retrieves whether players are made vanilla spectators when
MGPlayer.setSpectating(boolean) is called. |
void |
setAllowJoinRoundInProgress(boolean allow)
Sets whether players are allowed to join a round which
has already started . |
void |
setAllowJoinRoundWhilePreparing(boolean allow)
Sets whether players are allowed to join a round which
is in its preparation stage . |
void |
setBlockBreakAllowed(boolean allowed)
Sets whether block breaking is permitted for players in a
round . |
void |
setBlockBurnAllowed(boolean allowed)
Sets whether block burning is permitted in worlds containing one or more
arenas.
|
void |
setBlockBurningAllowed(boolean allowed)
Deprecated.
This method is improperly named, but remains for the sake of
reverse compatibility. You should instead use
setBlockBurnAllowed(boolean) . |
void |
setBlockFadeAllowed(boolean allowed)
Sets whether block fading (e.g.
|
void |
setBlockFlowAllowed(boolean allowed)
Sets whether block flowing is permitted in worlds containing one or more
arenas.
|
void |
setBlockGrowAllowed(boolean allowed)
Sets whether block growing (e.g.
|
void |
setBlockIgniteAllowed(boolean allowed)
Sets whether block ignition is permitted in worlds containing one or more
arenas.
|
void |
setBlockPhyiscsAllowed(boolean allowed)
Deprecated.
This method is improperly named, but remains for the sake of
reverse compatibility. You should instead use
setBlockPhysicsAllowed(boolean) . |
void |
setBlockPhysicsAllowed(boolean allowed)
Sets whether block physics are permitted in worlds containing one or more
arenas.
|
void |
setBlockPistonAllowed(boolean allowed)
Sets whether pistons are permitted in worlds containing one or more
arenas.
|
void |
setBlockPlaceAllowed(boolean allowed)
Sets whether block placing is permitted for players in a
round . |
void |
setBlockSpreadAllowed(boolean allowed)
Sets whether block spreading (e.g.
|
void |
setDamageAllowed(boolean allowed)
Sets whether players in rounds may receive damage by default.
|
void |
setDefaultExitLocation(org.bukkit.Location exitLocation)
Deprecated.
|
void |
setDefaultExitLocation(Location3D exitLocation)
Sets this default exit location for players upon a
round
ending (default: the spawn point of the main world). |
void |
setDefaultGameMode(GameMode gameMode)
Sets the default
gamemode for players entering minigame
rounds. |
void |
setDefaultLocale(java.lang.String locale)
Deprecated.
Obsolete since 0.5.0, as its value no longer affects anything
|
void |
setDefaultPlayingTime(int playingTime)
Sets the default time allotted to a round's
playing
period (default: 300). |
void |
setDefaultPreparationTime(int preparationTime)
Sets the default time allotted to a round's
preparation period (default: 90). |
void |
setEntityExplosionsAllowed(boolean allowed)
Sets whether entity explosions are permitted in worlds containing one or
more arenas.
|
void |
setEntityTargetingEnabled(boolean enabled)
Sets whether entities are permitted to target players in arenas.
|
void |
setHangingBreakAllowed(boolean allowed)
Sets whether hanging entity (e.g.
|
void |
setHungerEnabled(boolean enabled)
Retrieves whether hunger should drain from players in rounds.
|
void |
setItemFrameDamageAllowed(boolean allowed)
Sets whether players in a minigame may remove the item from an item frame
by clicking on it.
|
void |
setKitsAllowed(boolean allowed)
Sets whether players are permitted to use the /kit command while
partaking in a minigame.
|
void |
setLobbyArenaColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyArenaColor(Color color)
Sets the color of the top line (the arena name) of a lobby sign.
|
void |
setLobbyColor(java.lang.String key,
org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyColor(java.lang.String key,
Color color)
Sets a specific color attribute for lobby signs associated with this
manager's plugin.
|
void |
setLobbyPlayerCountColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyPlayerCountColor(Color color)
Sets the color of a lobby sign's player count when the round is not
full.
|
void |
setLobbyPlayerCountFullColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyPlayerCountFullColor(Color color)
Sets the color of a lobby sign's player count when the round is full.
|
void |
setLobbyPlayingColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyPlayingColor(Color color)
Sets the color of a lobby sign's
PLAYING status. |
void |
setLobbyPreparingColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyPreparingColor(Color color)
Sets the color of a lobby sign's
PREPARING
status. |
void |
setLobbyResettingColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyResettingColor(Color color)
Sets the color of a lobby sign's
RESETTING
status. |
void |
setLobbyTimeColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyTimeColor(Color color)
Sets the color of a lobby sign's timer when remaining time is greater
than 60 seconds.
|
void |
setLobbyTimeInfiniteColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyTimeInfiniteColor(Color color)
Sets the color of a lobby sign's timer when remaining time is infinite.
|
void |
setLobbyTimeWarningColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyTimeWarningColor(Color color)
Sets the color of a lobby sign's timer when remaining time is less than
60 seconds.
|
void |
setLobbyWaitingColor(org.bukkit.ChatColor color)
Deprecated.
|
void |
setLobbyWaitingColor(Color color)
Sets the color of a lobby sign's
WAITING status. |
void |
setMaxPlayers(int maxPlayers)
Sets the default maximum number of players allowed in a
round at one time (default: 32). |
void |
setMinPlayers(int minPlayers)
Sets the default minimum number of players required to automatically
start a
round . |
void |
setMobSpawningAllowed(boolean allowed)
Sets whether mob spawning is permitted in worlds containing an arena.
|
void |
setOverrideDeathEvent(boolean override)
Sets whether Bukkit's
PlayerDeathEvent will be overridden for
players participating in minigame rounds. |
void |
setPerRoundChatEnabled(boolean enabled)
Sets whether chat should be handled on a per-round basis (e.g.
|
void |
setPlayerClass(java.lang.Class<? extends MGPlayer> clazz)
Deprecated.
Use metadata instead.
|
void |
setPMsAllowed(boolean allowed)
Sets whether players partaking in a minigame are permitted to send
private messages or use the /pm command.
|
void |
setPvPAllowed(boolean allowed)
Sets whether PvP is allowed by default.
|
void |
setRandomSpawning(boolean random)
Sets whether players are sent to a random spawn when entered into an
arena.
|
void |
setRollbackEnabled(boolean enabled)
Sets whether rollback is enabled by default.
|
void |
setRoundClass(java.lang.Class<? extends Round> clazz)
Deprecated.
Use metadata instead.
|
void |
setSignId(java.lang.String signId)
Sets the associated plugin
lobby sign identifier, used
to recognize lobby signs. |
void |
setSpectateOnJoin(boolean allowed)
Sets whether players will be set to spectator mode upon joining around in
progress.
|
void |
setSpectatorChatSeparate(boolean separate)
Sets whether spectators are placed in a separate chat channel from active
players.
|
void |
setSpectatorFlightAllowed(boolean allowed)
Sets whether spectators are permitted to fly.
|
void |
setSpectatorsInTabList(boolean allowed)
Sets whether spectators should be displayed on the tab list.
|
void |
setSpectatorsOnLobbySigns(boolean displayed)
Sets whether spectators' names are displayed on lobby signs.
|
void |
setTeamChatEnabled(boolean enabled)
Sets whether teams in a round should have separate chat channels.
|
void |
setTeamDamageAllowed(boolean allowed)
Sets whether players are permitted to damage teammates.
|
void |
setTeleportationAllowed(boolean allowed)
Sets whether teleportation (via ender pearl, command, or another plugin)
is permitted for players in a
round . |
void |
setUsingVanillaSpectating(boolean vanillaSpectating)
Sets whether players are made vanilla spectators when
MGPlayer.setSpectating(boolean) is called. |
public ConfigManager(java.lang.String plugin)
plugin
- the plugin to associate this config manager withpublic Minigame getMinigame()
Minigame
associated with this config manager.Minigame
associated with this config managerpublic java.lang.String getPlugin()
public org.bukkit.Location getDefaultExitLocation()
public void setDefaultExitLocation(Location3D exitLocation)
round
ending (default: the spawn point of the main world).exitLocation
- this default exit location for players upon a round
ending@Deprecated public void setDefaultExitLocation(org.bukkit.Location exitLocation)
setDefaultExitLocation(Location3D)
round
ending (default: the spawn point of the main world).exitLocation
- this default exit location for players upon a round
endingpublic int getMinPlayers()
round
. (default: 0 (no minimum))round
public void setMinPlayers(int minPlayers)
round
. Set to 0 (default) for no autostart.minPlayers
- the default minimum number of players required to
automatically start a round
public int getMaxPlayers()
round
at one time (default: 32).round
at one timepublic void setMaxPlayers(int maxPlayers)
round
at one time (default: 32). Set to 0 for no limit.maxPlayers
- the default maximum number of players allowed in a
round
at one timepublic java.lang.String getSignId()
lobby sign
identifier,
used to recognize lobby signs. (default: your plugin's name in square
brackets)lobby sign
identifier,
used to recognize lobby signspublic void setSignId(java.lang.String signId)
lobby sign
identifier, used
to recognize lobby signs. (default: your plugin's name in square
brackets)signId
- the associated plugin lobby sign
identifier, used to recognize lobby signspublic int getDefaultPreparationTime()
preparation
period (default: 90).preparation
periodpublic void setDefaultPreparationTime(int preparationTime)
preparation
period (default: 90). Set to a value less than or equal to
zero to skip the preparation period.preparationTime
- the default time allotted to a round's preparation
periodpublic int getDefaultPlayingTime()
playing
period (default: 300).playing
periodpublic void setDefaultPlayingTime(int playingTime)
playing
period (default: 300). Set to a value less than or equal to zero for an
indefinite (infinite) time limit.playingTime
- the default time allotted to a round's playing
periodpublic boolean getAllowJoinRoundInProgress()
has already started
. (default: false
)has already started.
public void setAllowJoinRoundInProgress(boolean allow)
has already started
. (default: false
)allow
- whether players are allowed to join a round which has already started.
public boolean getAllowJoinRoundWhilePreparing()
is in its preparation stage
. (default:
false
)is in its preparation stage.
public void setAllowJoinRoundWhilePreparing(boolean allow)
is in its preparation stage
. (default:
false
)allow
- whether players are allowed to join a round which is in its preparation stage
.public boolean getSpectateOnJoin()
false
)public void setSpectateOnJoin(boolean allowed)
false
) This will have no effect if both
getAllowJoinRoundWhilePreparing()
and getAllowJoinRoundInProgress()
return false.allowed
- whether players will be set to spectator mode upon joining
around in progresspublic org.bukkit.ChatColor getLobbyArenaColor()
public void setLobbyArenaColor(Color color)
color
- the new color of the top line of a lobby sign@Deprecated public void setLobbyArenaColor(org.bukkit.ChatColor color)
setLobbyArenaColor(Color)
color
- the new color of the top line of a lobby signpublic org.bukkit.ChatColor getLobbyWaitingColor()
WAITING
status.WAITING
statuspublic void setLobbyWaitingColor(Color color)
WAITING
status.color
- the new color of a lobby sign's WAITING
status@Deprecated public void setLobbyWaitingColor(org.bukkit.ChatColor color)
setLobbyWaitingColor(Color)
WAITING
status.color
- the new color of a lobby sign's WAITING
statuspublic org.bukkit.ChatColor getLobbyPreparingColor()
PREPARING
status.PREPARING
statuspublic void setLobbyPreparingColor(Color color)
PREPARING
status.color
- the new color of a lobby sign's PREPARING
status@Deprecated public void setLobbyPreparingColor(org.bukkit.ChatColor color)
setLobbyPreparingColor(Color)
PREPARING
status.color
- the new color of a lobby sign's PREPARING
statuspublic org.bukkit.ChatColor getLobbyPlayingColor()
PLAYING
status.PLAYING
statuspublic void setLobbyPlayingColor(Color color)
PLAYING
status.color
- the new color of a lobby sign's PLAYING
status@Deprecated public void setLobbyPlayingColor(org.bukkit.ChatColor color)
setLobbyPlayingColor(Color)
PLAYING
status.color
- the new color of a lobby sign's PLAYING
statuspublic org.bukkit.ChatColor getLobbyResettingColor()
RESETTING
status.RESETTING
statuspublic void setLobbyResettingColor(Color color)
RESETTING
status.color
- the new color of a lobby sign's RESETTING
status@Deprecated public void setLobbyResettingColor(org.bukkit.ChatColor color)
setLobbyResettingColor(Color)
RESETTING
status.color
- the new color of a lobby sign's RESETTING
statuspublic org.bukkit.ChatColor getLobbyTimeColor()
public void setLobbyTimeColor(Color color)
color
- the new color of a lobby sign's timer when remaining time is
greater than 60 seconds@Deprecated public void setLobbyTimeColor(org.bukkit.ChatColor color)
setLobbyTimeColor(Color)
color
- the new color of a lobby sign's timer when remaining time is
greater than 60 secondspublic org.bukkit.ChatColor getLobbyTimeWarningColor()
public void setLobbyTimeWarningColor(Color color)
color
- the new color of a lobby sign's timer when remaining time is
less than 60 seconds@Deprecated public void setLobbyTimeWarningColor(org.bukkit.ChatColor color)
setLobbyTimeWarningColor(Color)
color
- the new color of a lobby sign's timer when remaining time is
less than 60 secondspublic org.bukkit.ChatColor getLobbyTimeInfiniteColor()
public void setLobbyTimeInfiniteColor(Color color)
color
- the new color of a lobby sign's timer when remaining time is
infinite@Deprecated public void setLobbyTimeInfiniteColor(org.bukkit.ChatColor color)
setLobbyTimeInfiniteColor(Color)
color
- the new color of a lobby sign's timer when remaining time is
infinitepublic org.bukkit.ChatColor getLobbyPlayerCountColor()
public void setLobbyPlayerCountColor(Color color)
color
- the new color of a lobby sign's player count when the round
is not full@Deprecated public void setLobbyPlayerCountColor(org.bukkit.ChatColor color)
setLobbyPlayerCountColor(Color)
color
- the new color of a lobby sign's player count when the round
is not fullpublic org.bukkit.ChatColor getLobbyPlayerCountFullColor()
public void setLobbyPlayerCountFullColor(Color color)
color
- the new color of a lobby sign's player count when the round
is full@Deprecated public void setLobbyPlayerCountFullColor(org.bukkit.ChatColor color)
setLobbyPlayerCountFullColor(Color)
color
- the new color of a lobby sign's player count when the round
is fullpublic java.util.HashMap<java.lang.String,org.bukkit.ChatColor> getLobbyColorAttributes()
public org.bukkit.ChatColor getLobbyColorAttribute(java.lang.String key)
key
- the attribute to fetch the color forpublic void setLobbyColor(java.lang.String key, Color color)
key
- the key of the color attribute (e.g. arena, player-count,
time)color
- the color to associate with aforementioned key@Deprecated public void setLobbyColor(java.lang.String key, org.bukkit.ChatColor color)
setLobbyColor(String, Color)
key
- the key of the color attribute (e.g. arena, player-count,
time)color
- the color to associate with aforementioned keypublic boolean isTeleportationAllowed()
round
. (default:
true)round
public void setTeleportationAllowed(boolean allowed)
round
. (default:
true
)allowed
- whether teleportation is permitted for players in a round
public boolean arePMsAllowed()
true
)
This can help limit communication of volatile information between teams,
such as in TTT.public void setPMsAllowed(boolean allowed)
true
)allowed
- whether players partaking in a minigame are permitted to
send private messages or use the /pm command.public boolean areKitsAllowed()
true
)public void setKitsAllowed(boolean allowed)
true
)allowed
- whether players are permitted to use the /kit command
while partaking in a minigamepublic boolean isBlockPlaceAllowed()
round
. (default: false
)round
public void setBlockPlaceAllowed(boolean allowed)
round
. (default: false
)allowed
- whether block placing is permitted for players in a round
public boolean isBlockBreakAllowed()
round
. (default: false
)round
public void setBlockBreakAllowed(boolean allowed)
round
. (default: false
)allowed
- whether block breaking is permitted for players in a
round
public boolean isHangingBreakAllowed()
round
. (default:
false
)round
public void setHangingBreakAllowed(boolean allowed)
round
. (default:
false
)allowed
- whether hanging entity breaking is permitted for players
in a round
public boolean isItemFrameDamageAllowed()
false
)public void setItemFrameDamageAllowed(boolean allowed)
false
)allowed
- whether players in a minigame may remove the item from an
item frame by clicking on itpublic boolean isBlockBurnAllowed()
false
)public void setBlockBurnAllowed(boolean allowed)
false
)allowed
- whether block burning is permitted in worlds containing
one or more arenas@Deprecated public void setBlockBurningAllowed(boolean allowed)
setBlockBurnAllowed(boolean)
.false
)allowed
- whether block burning is permitted in worlds containing
one or more arenaspublic boolean isBlockFadeAllowed()
false
)public void setBlockFadeAllowed(boolean allowed)
false
)allowed
- whether block fading (e.g. leaves decaying) is permitted
in worlds containing one or more arenaspublic boolean isBlockGrowAllowed()
false
)public void setBlockGrowAllowed(boolean allowed)
false
)allowed
- whether block growing (e.g. reeds growing) is permitted in
worlds containing one or more arenaspublic boolean isBlockIgniteAllowed()
false
)public void setBlockIgniteAllowed(boolean allowed)
false
)allowed
- whether block ignition is permitted in worlds containing
one or more arenaspublic boolean isBlockFlowAllowed()
true
)public void setBlockFlowAllowed(boolean allowed)
true
)allowed
- whether block flowing is permitted in worlds containing
one or more arenaspublic boolean areBlockPhysicsAllowed()
true
)@Deprecated public boolean isBlockPhysicsAllowed()
areBlockPhysicsAllowed()
.true
)public void setBlockPhysicsAllowed(boolean allowed)
true
)allowed
- whether block physics are permitted in worlds containing
one or more arenas@Deprecated public void setBlockPhyiscsAllowed(boolean allowed)
setBlockPhysicsAllowed(boolean)
.true
)allowed
- whether block physics are permitted in worlds containing
one or more arenaspublic boolean isBlockPistonAllowed()
true
)public void setBlockPistonAllowed(boolean allowed)
true
)allowed
- whether pistons are permitted in worlds containing one or
more arenaspublic boolean isBlockSpreadAllowed()
false
)public void setBlockSpreadAllowed(boolean allowed)
false
)allowed
- whether block spreading (e.g. grass spreding to dirt
blocks) are permitted in worlds containing one or more
arenas.public boolean areEntityExplosionsAllowed()
false
)@Deprecated public boolean isEntityExplosionsAllowed()
areEntityExplosionsAllowed()
.false
)public void setEntityExplosionsAllowed(boolean allowed)
false
)allowed
- whether entity explosions are permitted in worlds
containing one or more arenas@Deprecated public java.lang.Class<? extends MGPlayer> getPlayerClass()
class
object used to store information about
players in minigame rounds. (default: MGPlayer.class
@Deprecated public void setPlayerClass(java.lang.Class<? extends MGPlayer> clazz)
class
object used to store information about
players in minigame rounds. (default: MGPlayer.class
)
This may be used to add additional fields to MGLib's default MGPlayer
class.clazz
- the static class to use for player storage (e.g.
CustomPlayer.class)@Deprecated public java.lang.Class<? extends Round> getRoundClass()
class
object used to store information about
minigame rounds. (default: Round.class
@Deprecated public void setRoundClass(java.lang.Class<? extends Round> clazz)
class
object used to store information about
minigame rounds. (default: Round.class
) This may be used to
add additional fields or methods to MGLib's default Round
class.clazz
- the static class to use for round storage (e.g.
CustomRound.class)public GameMode getDefaultGameMode()
gamemode
for players entering
minigame rounds. (default: GameMode.SURVIVAL
)gamemode
for players entering
minigame roundspublic void setDefaultGameMode(GameMode gameMode)
gamemode
for players entering minigame
rounds. (default: GameMode.SURVIVAL
gameMode
- the default gamemode
for players
entering minigame roundspublic boolean isPvPAllowed()
true
)public void setPvPAllowed(boolean allowed)
true
)allowed
- whether PvP is allowed by defaultpublic boolean isDamageAllowed()
true
)public void setDamageAllowed(boolean allowed)
allowed
- whether players in rounds may receive damage by defaultpublic boolean isRollbackEnabled()
true
)public void setRollbackEnabled(boolean enabled)
true
)enabled
- whether rollback is enabled by defaultpublic boolean areSpectatorsOnLobbySigns()
public void setSpectatorsOnLobbySigns(boolean displayed)
displayed
- whether spectators' names are displayed on lobby signspublic boolean isSpectatorFlightAllowed()
true
) This will be overridden if allow-flight is set to
false in the server.properties file, or if isUsingVanillaSpectating()
returns true.public void setSpectatorFlightAllowed(boolean allowed)
true
) This will be overridden if allow-flight is set to
false in the server.properties file, or if isUsingVanillaSpectating()
returns true.allowed
- whether spectators are permitted to flypublic boolean isTeamDamageAllowed()
public void setTeamDamageAllowed(boolean allowed)
true
)allowed
- whether players are permitted to damage teammates@Deprecated public java.lang.String getDefaultLocale()
@Deprecated public void setDefaultLocale(java.lang.String locale)
locale
- the locale to fall back to if the one defined in the MGLib
config cannot be loadedpublic boolean isRandomSpawning()
true
)public void setRandomSpawning(boolean random)
true
) When false, the first player to join
will be sent to spawn 0, the second to spawn 1, etc.random
- whether players should be sent to a random spawnpublic boolean isOverrideDeathEvent()
PlayerDeathEvent
will be overridden
for players participating in minigame rounds. (default:
false
) If true, the death event will be cancelled and a
custom MGLib event will be thrown instead.PlayerDeathEvent
will be overriddenpublic void setOverrideDeathEvent(boolean override)
PlayerDeathEvent
will be overridden for
players participating in minigame rounds. (default: false
)
If true, the death event will be cancelled and a custom MGLib event will
be thrown instead.override
- whether Bukkit's PlayerDeathEvent
will be
overriddenpublic boolean isHungerEnabled()
public void setHungerEnabled(boolean enabled)
enabled
- whether hunger should drain from players in roundspublic boolean isPerRoundChatEnabled()
true
)public void setPerRoundChatEnabled(boolean enabled)
enabled
- whether chat should be handled on a per-round basis (e.g.
players in an arena only see messages sent by players in
the same arena).public boolean isTeamChatEnabled()
false
) (default: false
)public void setTeamChatEnabled(boolean enabled)
false
)enabled
- whether teams in a round should have separate chat
channelspublic boolean isMobSpawningAllowed()
true
)public void setMobSpawningAllowed(boolean allowed)
true
)allowed
- whether mob spawning is permitted in worlds containing an
arenapublic boolean isEntityTargetingEnabled()
false
)public void setEntityTargetingEnabled(boolean enabled)
false
)enabled
- whether entities are permitted to target players in
arenaspublic boolean isSpectatorChatSeparate()
true
)public void setSpectatorChatSeparate(boolean separate)
true
)separate
- whether spectators are placed in a separate chat channel
from active playerspublic boolean isUsingVanillaSpectating()
MGPlayer.setSpectating(boolean)
is called. (default: true
)
If false, the player will be manually made invisible and flying.MGPlayer.setSpectating(boolean)
is calledpublic void setUsingVanillaSpectating(boolean vanillaSpectating)
MGPlayer.setSpectating(boolean)
is called. (default: true
)
If false, the player will be manually made invisible and flying.vanillaSpectating
- whether players are made vanilla spectators when
MGPlayer.setSpectating(boolean)
is
called.public boolean areSpectatorsInTabList()
true
)public void setSpectatorsInTabList(boolean allowed)
allowed
- whether spectators should be displayed on the tab list