AutoReferee  2.5
 All Classes Functions Variables
org.mctourney.autoreferee.AutoRefMatch Class Reference

Represents a game world controlled by AutoReferee. More...

Inherits org.mctourney.autoreferee.util.Metadatable.

Inherited by org.mctourney.autoreferee.FreeForAllMatch.

Classes

enum  MatchStatus
 Represents the status of a match. More...
 

Public Member Functions

void addEvent (TranscriptEvent event)
 Adds an event to the match transcript. More...
 
void addExpectedPlayer (OfflinePlayer opl)
 Adds a player to the list of expected players, without a team affiliation.
 
void addIllegalCraft (BlockData blockdata)
 Prohibits an item from being crafted during a match. More...
 
boolean allowFriendlyFire ()
 Checks if friendly fire is allowed in this match. More...
 
boolean allowObjectiveCraft ()
 Checks if players are allowed to craft objectives in this match. More...
 
void broadcast (String...msgs)
 Sends a message to all players in this match, including referees and streamers. More...
 
void broadcastSync (String...msgs)
 Force a broadcast to be sent synchronously. More...
 
void cancelCountdown ()
 Cancels the match countdown in progress.
 
boolean canCraft (BlockData blockdata)
 Checks if a item is prohibited from crafting. More...
 
void checkTeamsReady ()
 Checks if teams have any players missing and are ready to play.
 
void checkTeamsStart ()
 Checks if teams and referees are ready for the match to start.
 
void checkWinConditions ()
 Checks if any team has satisfied the win conditions.
 
void clearEntities ()
 Removes unprotected entities from the world.
 
String colorMessage (String message)
 Colors a message with team and objective colors. More...
 
void destroy (MatchUnloadEvent.Reason reason)
 Unloads and cleans up this match. More...
 
double distanceToClosestRegion (Player player)
 Gets distance player is from their team's nearest region. More...
 
File distributeMap () throws IOException
 Packages and compresses (zip) map folder for easy distribution. More...
 
void eliminatePlayer (Player player)
 Eliminates player from the match.
 
void endMatch ()
 Ends match, allowing AutoReferee to break ties according to its own policies.
 
void endMatch (AutoRefTeam team)
 Ends match in favor of a specified team. More...
 
AutoRefTeam expectedTeam (OfflinePlayer opl)
 Gets the team the specified player is expected to join. More...
 
AutoRefTeam getArbitraryTeam ()
 Gets an arbitrary team, attempting to maintain balanced teams if possible. More...
 
String getAuthorList ()
 Gets the creators of the map for this match. More...
 
MatchStatus getCurrentState ()
 Gets the current status of this match. More...
 
String getDisplayName (Player player)
 Gets colored player name for a specified player. More...
 
long getElapsedSeconds ()
 Gets the number of seconds elapsed in this match. More...
 
int getInexactRange ()
 Gets the distance an objective may be placed from its target location. More...
 
Collection< String > getMapAuthors ()
 Gets the creators of the map for this match. More...
 
String getMapName ()
 Gets the name of the map for this match. More...
 
String getMapVersion ()
 Gets the version number of the map for this match. More...
 
ItemStack getMatchInfoBook ()
 Gets the book given to players upon joining this match.
 
String getMatchName ()
 Gets the name of this match. More...
 
AutoRefPlayer getNearestPlayer (Location loc)
 Gets the player nearest to a specified location. More...
 
AutoRefPlayer getPlayer (String name)
 Gets AutoRefPlayer object associated with a given player. More...
 
AutoRefPlayer getPlayer (OfflinePlayer player)
 Gets AutoRefPlayer object associated with a given player. More...
 
Location getPlayerSpawn (Player player)
 Gets spawn location for the specified player, based on team. More...
 
AutoRefTeam getPlayerTeam (Player player)
 Gets the team for a specified player. More...
 
int getReadyDelay ()
 Gets number of seconds between start of countdown and match starting. More...
 
Set< Player > getReferees ()
 Gets all non-streamer referees present in this match. More...
 
Set< Player > getReferees (boolean excludeStreamers)
 Gets referees present in this match, possibly excluding streamers. More...
 
ReportGenerator getReportGenerator ()
 Gets the mutable report generator object. More...
 
Role getRole (OfflinePlayer player)
 Gets the role that this player has in this match. More...
 
Set< Player > getSpectators ()
 Gets all match spectators (spectators, referees, and streamers). More...
 
Location getSpectatorSpawn ()
 Gets the global spawn location for this match. More...
 
long getStartClock ()
 Gets the time to set the world to at the start of the match. More...
 
StartMechanism getStartMechanism (Block block)
 Gets the start mechanism associated with this location. More...
 
Set< AutoRefRegion > getStartRegions ()
 Gets the region designated as the start platform. More...
 
Set< Player > getStreamers ()
 Gets streamers present in this match. More...
 
AutoRefTeam getTeam (String name)
 Finds a team whose name matches the given string. More...
 
Set< AutoRefTeamgetTeams ()
 Gets the teams participating in this match. More...
 
long getTimeLimit ()
 Gets the match time limit in seconds. More...
 
long getTimeRemaining ()
 Gets the number of seconds remaining in this match. More...
 
String getTimestamp ()
 Gets current match time, default value separator (colon). More...
 
String getTimestamp (String sep)
 Gets current match time, with value separator. More...
 
List< TranscriptEvent > getTranscript ()
 Gets the current match transcript up to this point in time. More...
 
int getUserCount ()
 Gets number of users (players and spectators) present in this match. More...
 
String getVersionString ()
 Gets the shorthand version string of the map for this match. More...
 
AutoRefTeam getWinningTeam ()
 Gets the team that won this match. More...
 
World getWorld ()
 Gets the world associated with this match. More...
 
Location getWorldSpawn ()
 Gets the global spawn location for this match. More...
 
boolean hasFlag (Location loc, AutoRefRegion.Flag flag)
 Checks if a region is marked with a specific region flag. More...
 
boolean hasTimeLimit ()
 Checks if this match has a set time limit. More...
 
boolean inStartRegion (Location loc)
 Checks if a specified location is within the start region. More...
 
boolean isCountdownRunning ()
 Checks if the match start countdown is running. More...
 
boolean isPlayer (OfflinePlayer pl)
 Checks if the specified player is on a team. More...
 
boolean isPlayerExpected (OfflinePlayer opl)
 Checks if the specified player is expected to join this match. More...
 
boolean isReferee (Player player)
 Checks if the specified player is a referee for this match. More...
 
boolean isRefereeReady ()
 Checks if the referees are ready for the match to start. More...
 
boolean isSpectator (Player player)
 Checks if the specified player is a spectator for this match. More...
 
boolean isStartMechanism (Block block)
 Checks if a specified block location is a start mechanism for this match. More...
 
boolean isStreamer (Player player)
 Checks if the specified player is a streamer for this match. More...
 
void joinMatch (Player player)
 Teleports a player to a match they have been added to, joining the team inviting them.
 
boolean joinTeam (Player player, AutoRefTeam team, PlayerTeamJoinEvent.Reason reason, boolean force)
 Adds a player to the specified team. More...
 
void leaveTeam (Player player, boolean force)
 Removes player from all teams. More...
 
void messageReferees (String...parts)
 Sends a referee plugin channel message to all referees, properly delimited.
 
void reload ()
 Reloads world configuration from config file.
 
void removeExpectedPlayer (OfflinePlayer opl)
 Removes a specified player from any expected player lists for this match.
 
void saveWorldConfiguration ()
 Saves copy of autoreferee.xml back to the world folder.
 
void sendMatchInfo (CommandSender sender)
 Send updated match information to a player.
 
void setCurrentState (MatchStatus status)
 Sets the current status of this match. More...
 
void setCustomMatchInfoBook (ItemStack book)
 Sets a custom book given to players upon joining this match. More...
 
void setFriendlyFire (boolean b)
 Sets whether friendly fire is allowed in this match.
 
void setLastNotificationLocation (Location loc)
 Sets a notification location for referees and streamers. More...
 
void setMatchName (String name)
 Sets the custom name for this match. More...
 
void setObjectiveCraft (boolean b)
 Sets whether players are allowed to craft objectives in this match.
 
void setReadyDelay (int delay)
 Sets number of seconds between start of countdown and match starting.
 
void setRefereeReady (boolean r)
 Sets whether the referees are ready for the match to start.
 
void setSpectatorMode (Player player, boolean spec)
 Sets whether a specified player is in spectator mode, explicitly setting gamemode. More...
 
void setStartClock (long time)
 Sets the time that will be set at the start of the match. More...
 
void setTimeLimit (long limit)
 Sets match time limit in seconds. More...
 
void setupSpectators ()
 Reconfigures spectator mode for all connected players.
 
void setupSpectators (Player player)
 Reconfigures spectator mode for a single player. More...
 
void setupVisibility (Player player)
 Reconfigures visibility, to and from the specified player.
 
void setWinningTeam (AutoRefTeam team)
 Sets the team that won this match.
 
void startCountdown (int delay, boolean start)
 Starts a countdown. More...
 
StartMechanism toggleStartMech (Block block, boolean state)
 Adds a new start mechanism for this map. More...
 
void updateReferee (Player ref)
 Sends all information to a single referee necessary to sync a match's current status. More...
 

Static Public Member Functions

static boolean areTiesAllowed ()
 Checks if ties are allowed on this server. More...
 
static void changeMapRepo (String url)
 Sets a new map repository for the plugin to download maps. More...
 
static String getMapRepo ()
 Get the base url for the map repository. More...
 
static boolean isCompatible (World world)
 Checks if the given world is compatible with AutoReferee. More...
 
static void messageReferee (Player ref, String...parts)
 Sends a referee plugin channel message to a specific referee, properly delimited. More...
 
static String normalizeMapName (String name)
 Removes any non-alphanumeric characters from a map name. More...
 
static long parseTimeString (String time)
 Converts a human-readable time to a clock tick in Minecraft. More...
 
static void setAllowTies (boolean b)
 Sets whether ties are allowed on this server.
 
static void setupWorld (World world, boolean tmp)
 Assigns a world a match object. More...
 

Protected Member Functions

void _startMatch ()
 Starts the match.
 

Detailed Description

Represents a game world controlled by AutoReferee.

Author
authorblues

Member Function Documentation

void org.mctourney.autoreferee.AutoRefMatch.addEvent ( TranscriptEvent  event)

Adds an event to the match transcript.

Announces the event to the appropriate recipients.

Parameters
eventevent to be added to the transcript
void org.mctourney.autoreferee.AutoRefMatch.addIllegalCraft ( BlockData  blockdata)

Prohibits an item from being crafted during a match.

Parameters
blockdatablock data object for the prohibited item
boolean org.mctourney.autoreferee.AutoRefMatch.allowFriendlyFire ( )

Checks if friendly fire is allowed in this match.

Returns
true if friendly fire is allowed, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.allowObjectiveCraft ( )

Checks if players are allowed to craft objectives in this match.

Returns
true if players may craft objectives, otherwise false
static boolean org.mctourney.autoreferee.AutoRefMatch.areTiesAllowed ( )
static

Checks if ties are allowed on this server.

Returns
true if ties are allowed, otherwise false
void org.mctourney.autoreferee.AutoRefMatch.broadcast ( String...  msgs)

Sends a message to all players in this match, including referees and streamers.

Parameters
msgsmessages to be sent
void org.mctourney.autoreferee.AutoRefMatch.broadcastSync ( String...  msgs)

Force a broadcast to be sent synchronously.

Safe to use from an asynchronous task.

Parameters
msgsmessages to be sent
boolean org.mctourney.autoreferee.AutoRefMatch.canCraft ( BlockData  blockdata)

Checks if a item is prohibited from crafting.

Parameters
blockdatablock data object for the item being queried
Returns
true if item may be crafted, otherwise false
static void org.mctourney.autoreferee.AutoRefMatch.changeMapRepo ( String  url)
static

Sets a new map repository for the plugin to download maps.

Parameters
urlurl of new map repository to use
String org.mctourney.autoreferee.AutoRefMatch.colorMessage ( String  message)

Colors a message with team and objective colors.

Prepares a message for broadcasting to the chat, and should be used as a pre-processing step whenever a message needs to be pretty-printed.

Parameters
messageplain message
Returns
colored message
void org.mctourney.autoreferee.AutoRefMatch.destroy ( MatchUnloadEvent.Reason  reason)

Unloads and cleans up this match.

Players will be teleported out or kicked, the map will be unloaded, and the map folder may be deleted.

double org.mctourney.autoreferee.AutoRefMatch.distanceToClosestRegion ( Player  player)

Gets distance player is from their team's nearest region.

Returns
distance to team's nearest region
File org.mctourney.autoreferee.AutoRefMatch.distributeMap ( ) throws IOException

Packages and compresses (zip) map folder for easy distribution.

Returns
generated zip file
Exceptions
IOExceptionif map cannot be archived
void org.mctourney.autoreferee.AutoRefMatch.endMatch ( AutoRefTeam  team)

Ends match in favor of a specified team.

Parameters
teamwinning team, or null for no winner
AutoRefTeam org.mctourney.autoreferee.AutoRefMatch.expectedTeam ( OfflinePlayer  opl)

Gets the team the specified player is expected to join.

Returns
team player is expected to join, otherwise null
AutoRefTeam org.mctourney.autoreferee.AutoRefMatch.getArbitraryTeam ( )

Gets an arbitrary team, attempting to maintain balanced teams if possible.

Returns
an arbitrary team
String org.mctourney.autoreferee.AutoRefMatch.getAuthorList ( )

Gets the creators of the map for this match.

Returns
string list of names
MatchStatus org.mctourney.autoreferee.AutoRefMatch.getCurrentState ( )

Gets the current status of this match.

Returns
match status
String org.mctourney.autoreferee.AutoRefMatch.getDisplayName ( Player  player)

Gets colored player name for a specified player.

Returns
colored player name
long org.mctourney.autoreferee.AutoRefMatch.getElapsedSeconds ( )

Gets the number of seconds elapsed in this match.

Returns
current elapsed seconds if match in progress, otherwise 0L
int org.mctourney.autoreferee.AutoRefMatch.getInexactRange ( )

Gets the distance an objective may be placed from its target location.

Returns
range of inexact objective placement
Collection<String> org.mctourney.autoreferee.AutoRefMatch.getMapAuthors ( )

Gets the creators of the map for this match.

Returns
collection of names
String org.mctourney.autoreferee.AutoRefMatch.getMapName ( )

Gets the name of the map for this match.

Returns
map name
static String org.mctourney.autoreferee.AutoRefMatch.getMapRepo ( )
static

Get the base url for the map repository.

Returns
url of map repository
String org.mctourney.autoreferee.AutoRefMatch.getMapVersion ( )

Gets the version number of the map for this match.

Returns
version number
String org.mctourney.autoreferee.AutoRefMatch.getMatchName ( )

Gets the name of this match.

Returns
match name
AutoRefPlayer org.mctourney.autoreferee.AutoRefMatch.getNearestPlayer ( Location  loc)

Gets the player nearest to a specified location.

Returns
player object for closest player, or null if no players
AutoRefPlayer org.mctourney.autoreferee.AutoRefMatch.getPlayer ( String  name)

Gets AutoRefPlayer object associated with a given player.

Parameters
nameplayer name
Returns
matching AutoRefPlayer object, or null if no match
AutoRefPlayer org.mctourney.autoreferee.AutoRefMatch.getPlayer ( OfflinePlayer  player)

Gets AutoRefPlayer object associated with a given player.

Returns
matching AutoRefPlayer object, or null if no match
Location org.mctourney.autoreferee.AutoRefMatch.getPlayerSpawn ( Player  player)

Gets spawn location for the specified player, based on team.

Returns
team-specific spawn location, or world spawn if not set
AutoRefTeam org.mctourney.autoreferee.AutoRefMatch.getPlayerTeam ( Player  player)

Gets the team for a specified player.

Returns
associated team object if one exists, otherwise null
int org.mctourney.autoreferee.AutoRefMatch.getReadyDelay ( )

Gets number of seconds between start of countdown and match starting.

Returns
number of seconds for match countdown
Set<Player> org.mctourney.autoreferee.AutoRefMatch.getReferees ( )

Gets all non-streamer referees present in this match.

Returns
collection of referees
Set<Player> org.mctourney.autoreferee.AutoRefMatch.getReferees ( boolean  excludeStreamers)

Gets referees present in this match, possibly excluding streamers.

Parameters
excludeStreamerswhether streamers should be included
Returns
collection of referees
ReportGenerator org.mctourney.autoreferee.AutoRefMatch.getReportGenerator ( )

Gets the mutable report generator object.

Returns
report generator object
Role org.mctourney.autoreferee.AutoRefMatch.getRole ( OfflinePlayer  player)

Gets the role that this player has in this match.

Returns
a role corresponding to this player
Set<Player> org.mctourney.autoreferee.AutoRefMatch.getSpectators ( )

Gets all match spectators (spectators, referees, and streamers).

Returns
collection of spectators
Location org.mctourney.autoreferee.AutoRefMatch.getSpectatorSpawn ( )

Gets the global spawn location for this match.

Returns
global spawn location
long org.mctourney.autoreferee.AutoRefMatch.getStartClock ( )

Gets the time to set the world to at the start of the match.

Returns
world time in ticks to be set at start of the match
StartMechanism org.mctourney.autoreferee.AutoRefMatch.getStartMechanism ( Block  block)

Gets the start mechanism associated with this location.

Returns
start mechanism located at that position, otherwise null
Set<AutoRefRegion> org.mctourney.autoreferee.AutoRefMatch.getStartRegions ( )

Gets the region designated as the start platform.

This region should contain the world spawn location. Players in this region are immune to damage from other players, and mobs will not spawn in this region.

Returns
start region
Set<Player> org.mctourney.autoreferee.AutoRefMatch.getStreamers ( )

Gets streamers present in this match.

Returns
collection of streamers
AutoRefTeam org.mctourney.autoreferee.AutoRefMatch.getTeam ( String  name)

Finds a team whose name matches the given string.

Parameters
nameteam name to look up, either custom team name or base team name
Returns
team object matching the name if one exists, otherwise null
Set<AutoRefTeam> org.mctourney.autoreferee.AutoRefMatch.getTeams ( )

Gets the teams participating in this match.

Returns
set of teams
long org.mctourney.autoreferee.AutoRefMatch.getTimeLimit ( )

Gets the match time limit in seconds.

Returns
time limit in seconds
long org.mctourney.autoreferee.AutoRefMatch.getTimeRemaining ( )

Gets the number of seconds remaining in this match.

Returns
time remaining in seconds
String org.mctourney.autoreferee.AutoRefMatch.getTimestamp ( )

Gets current match time, default value separator (colon).

Returns
current match timestamp
String org.mctourney.autoreferee.AutoRefMatch.getTimestamp ( String  sep)

Gets current match time, with value separator.

Parameters
septime value separator
Returns
current match timestamp
List<TranscriptEvent> org.mctourney.autoreferee.AutoRefMatch.getTranscript ( )

Gets the current match transcript up to this point in time.

Returns
immutable copy of the match transcript
int org.mctourney.autoreferee.AutoRefMatch.getUserCount ( )

Gets number of users (players and spectators) present in this match.

Returns
number of users
String org.mctourney.autoreferee.AutoRefMatch.getVersionString ( )

Gets the shorthand version string of the map for this match.

This string will have the format of "MapName-vX.Y"

Returns
version string
AutoRefTeam org.mctourney.autoreferee.AutoRefMatch.getWinningTeam ( )

Gets the team that won this match.

Returns
team that won the match if it is over, otherwise null
World org.mctourney.autoreferee.AutoRefMatch.getWorld ( )

Gets the world associated with this match.

Returns
world
Location org.mctourney.autoreferee.AutoRefMatch.getWorldSpawn ( )

Gets the global spawn location for this match.

Returns
global spawn location
boolean org.mctourney.autoreferee.AutoRefMatch.hasFlag ( Location  loc,
AutoRefRegion.Flag  flag 
)

Checks if a region is marked with a specific region flag.

Returns
true if location contains flag, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.hasTimeLimit ( )

Checks if this match has a set time limit.

Returns
true if a time limit is set, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.inStartRegion ( Location  loc)

Checks if a specified location is within the start region.

Returns
true if location is inside start region, otherwise false
static boolean org.mctourney.autoreferee.AutoRefMatch.isCompatible ( World  world)
static

Checks if the given world is compatible with AutoReferee.

Parameters
worldworld to check
Returns
true if the world contains a config file, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isCountdownRunning ( )

Checks if the match start countdown is running.

Returns
true if the countdown is in progress, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isPlayer ( OfflinePlayer  pl)

Checks if the specified player is on a team.

Returns
true if player is on a team, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isPlayerExpected ( OfflinePlayer  opl)

Checks if the specified player is expected to join this match.

Returns
true if player is expected, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isReferee ( Player  player)

Checks if the specified player is a referee for this match.

Returns
true if player is a referee and not on a team, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isRefereeReady ( )

Checks if the referees are ready for the match to start.

Returns
true if referees are ready or there are no referees, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isSpectator ( Player  player)

Checks if the specified player is a spectator for this match.

Returns
true if player is a spectator, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isStartMechanism ( Block  block)

Checks if a specified block location is a start mechanism for this match.

Returns
true if a start mechanism is located at that position, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.isStreamer ( Player  player)

Checks if the specified player is a streamer for this match.

Returns
true if player is a streamer and not on a team, otherwise false
boolean org.mctourney.autoreferee.AutoRefMatch.joinTeam ( Player  player,
AutoRefTeam  team,
PlayerTeamJoinEvent.Reason  reason,
boolean  force 
)

Adds a player to the specified team.

Removes the player from any other teams first, if necessary. Roster changes are restricted while a match is in progress, unless forced.

Parameters
playerplayer to be added to team
teamteam to add player to
forceshould player be added to team, even if match is in progress
Returns
true if player was added to team, otherwise false
void org.mctourney.autoreferee.AutoRefMatch.leaveTeam ( Player  player,
boolean  force 
)

Removes player from all teams.

Parameters
playerplayer to be removed
forceshould player be removed, even if match is in progress
static void org.mctourney.autoreferee.AutoRefMatch.messageReferee ( Player  ref,
String...  parts 
)
static

Sends a referee plugin channel message to a specific referee, properly delimited.

Parameters
refreferee to recieve the plugin channel message
static String org.mctourney.autoreferee.AutoRefMatch.normalizeMapName ( String  name)
static

Removes any non-alphanumeric characters from a map name.

Prepares a map name to be used as a file name or a target in a chat command.

Parameters
nameoriginal map name
Returns
normalized version of map name
static long org.mctourney.autoreferee.AutoRefMatch.parseTimeString ( String  time)
static

Converts a human-readable time to a clock tick in Minecraft.

Converts times such as "8am", "1600", or "3:45p" to a valid clock tick setting that can be used to change the world time.

Parameters
timeA string representing a human-readable time.
Returns
Equivalent clock tick
void org.mctourney.autoreferee.AutoRefMatch.setCurrentState ( MatchStatus  status)

Sets the current status of this match.

Parameters
statusnew match status
void org.mctourney.autoreferee.AutoRefMatch.setCustomMatchInfoBook ( ItemStack  book)

Sets a custom book given to players upon joining this match.

Parameters
bookbook given to players, or null for default (generated) book.
void org.mctourney.autoreferee.AutoRefMatch.setLastNotificationLocation ( Location  loc)

Sets a notification location for referees and streamers.

This location should be the exact location of the event. The teleportation suite will find a suitable vantage point to observe the event.

Parameters
locnotification location
void org.mctourney.autoreferee.AutoRefMatch.setMatchName ( String  name)

Sets the custom name for this match.

Parameters
namecustom match name
void org.mctourney.autoreferee.AutoRefMatch.setSpectatorMode ( Player  player,
boolean  spec 
)

Sets whether a specified player is in spectator mode, explicitly setting gamemode.

Parameters
playerplayer to set spectator mode for
spectrue to set spectator mode on, false to set spectator mode off
void org.mctourney.autoreferee.AutoRefMatch.setStartClock ( long  time)

Sets the time that will be set at the start of the match.

Parameters
timeworld time in ticks to set at start of the match
void org.mctourney.autoreferee.AutoRefMatch.setTimeLimit ( long  limit)

Sets match time limit in seconds.

Parameters
limitnew time limit in seconds
void org.mctourney.autoreferee.AutoRefMatch.setupSpectators ( Player  player)

Reconfigures spectator mode for a single player.

Useful for updating all players when one player logs in.

Parameters
playerplayer to configure spectator mode for
static void org.mctourney.autoreferee.AutoRefMatch.setupWorld ( World  world,
boolean  tmp 
)
static

Assigns a world a match object.

Best suited for retro-fitting worlds that have already been loaded.

Parameters
worldloaded AutoReferee-compatible world
tmpwhether this world should be unloaded when the match completes
void org.mctourney.autoreferee.AutoRefMatch.startCountdown ( int  delay,
boolean  start 
)

Starts a countdown.

Parameters
delaynumber of seconds before end of countdown
starttrue if countdown should start match, otherwise false
StartMechanism org.mctourney.autoreferee.AutoRefMatch.toggleStartMech ( Block  block,
boolean  state 
)

Adds a new start mechanism for this map.

These mechanisms are activated automatically at the start of a match when using SportBukkit, and players may interact with them normally in the start region when using vanilla CraftBukkit.

Parameters
blockblock containing the start mechanism
statewhether this mechanism should be set powered or unpowered
Returns
generated start mechanism object
See Also
SportBukkit
void org.mctourney.autoreferee.AutoRefMatch.updateReferee ( Player  ref)

Sends all information to a single referee necessary to sync a match's current status.

Parameters
refreferee to receive the plugin channel messages

The documentation for this class was generated from the following file: