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

Base plugin class. More...

Inherits JavaPlugin.

Public Member Functions

void addMatch (AutoRefMatch match)
 Adds a given match to be tracked by the server.
 
void clearMatch (AutoRefMatch match)
 Removes a match from the server.
 
AutoRefPlayer clearTNTOwner (Entity entity)
 Clears out a primed TNT from the tracked list. More...
 
World getConsoleWorld ()
 Gets the world that the console user has selected. More...
 
AutoRefTeam getExpectedTeam (Player player)
 Gets the team the player is expected to join. More...
 
World getLobbyWorld ()
 Gets the world designated as the lobby world. More...
 
AutoRefMatch getMatch (World world)
 Gets match object associated with the given world. More...
 
Collection< AutoRefMatchgetMatches ()
 Gets all existing match objects for this server. More...
 
World getSenderWorld (CommandSender sender)
 Gets the world associated with a command sender.
 
AutoRefTeam getTeam (Player player)
 Gets team object associated with a player. More...
 
AutoRefPlayer getTNTOwner (Entity entity)
 Gets the player responsible for a primed TNT. More...
 
void sendMessageSync (CommandSender recipient, String...msgs)
 Force a message to be sent synchronously. More...
 
void setConsoleWorld (World world)
 Sets the world that the console user has selected.
 
void setConsoleWorld (String name)
 Sets the world that the console user has selected.
 
void setLobbyWorld (World world)
 Sets the world designated as the lobby world. More...
 
void setTNTOwner (Entity entity, AutoRefPlayer apl)
 Sets the player responsible for a primed TNT. More...
 

Static Public Member Functions

static AutoReferee getInstance ()
 Gets the singleton instance of AutoReferee. More...
 

Detailed Description

Base plugin class.

Author
authorblues

Member Function Documentation

AutoRefPlayer org.mctourney.autoreferee.AutoReferee.clearTNTOwner ( Entity  entity)

Clears out a primed TNT from the tracked list.

Parameters
entityprimed tnt entity
World org.mctourney.autoreferee.AutoReferee.getConsoleWorld ( )

Gets the world that the console user has selected.

Returns
The world selected by the console user
AutoRefTeam org.mctourney.autoreferee.AutoReferee.getExpectedTeam ( Player  player)

Gets the team the player is expected to join.

Matches setup by automated match configurations may designate certain players for certain teams.

Returns
player's team, null if no such team
static AutoReferee org.mctourney.autoreferee.AutoReferee.getInstance ( )
static

Gets the singleton instance of AutoReferee.

Returns
AutoReferee instance
World org.mctourney.autoreferee.AutoReferee.getLobbyWorld ( )

Gets the world designated as the lobby world.

When the server is in automated mode, this world is where users will be teleported to when the a match is unloaded and cleaned up.

Returns
lobby world
AutoRefMatch org.mctourney.autoreferee.AutoReferee.getMatch ( World  world)

Gets match object associated with the given world.

Returns
match object if one exists, otherwise null
Collection<AutoRefMatch> org.mctourney.autoreferee.AutoReferee.getMatches ( )

Gets all existing match objects for this server.

Returns
a collection of match objects
AutoRefTeam org.mctourney.autoreferee.AutoReferee.getTeam ( Player  player)

Gets team object associated with a player.

Searches all matches for this player, returns team object for the team containing this player.

Returns
team object if player is on team, otherwise null
AutoRefPlayer org.mctourney.autoreferee.AutoReferee.getTNTOwner ( Entity  entity)

Gets the player responsible for a primed TNT.

Parameters
entityprimed tnt entity
void org.mctourney.autoreferee.AutoReferee.sendMessageSync ( CommandSender  recipient,
String...  msgs 
)

Force a message to be sent synchronously.

Safe to use from an asynchronous task.

Parameters
msgsmessages to be sent
void org.mctourney.autoreferee.AutoReferee.setLobbyWorld ( World  world)

Sets the world designated as the lobby world.

Parameters
worldlobby world
void org.mctourney.autoreferee.AutoReferee.setTNTOwner ( Entity  entity,
AutoRefPlayer  apl 
)

Sets the player responsible for a primed TNT.

Parameters
entityprimed tnt entity
aplplayer responsible for tnt

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