Package fr.minuskube.netherboard
Class Netherboard
java.lang.Object
fr.minuskube.netherboard.Netherboard
The main class of the Netherboard API for Bukkit,
you'll need to use it if you want to create boards.
To create a board, get the instance using
Netherboard.instance()
and call one of the createBoard() methods.-
Method Summary
Modifier and TypeMethodDescriptioncreateBoard(org.bukkit.entity.Player player, String name) Creates a board to a player.createBoard(org.bukkit.entity.Player player, org.bukkit.scoreboard.Scoreboard scoreboard, String name) Creates a board to a player, using a predefined scoreboard.voiddeleteBoard(org.bukkit.entity.Player player) Deletes the board of a player.getBoard(org.bukkit.entity.Player player) Gets the board of a player.Map<org.bukkit.entity.Player,BPlayerBoard> Gets all the boards mapped to their player.booleanhasBoard(org.bukkit.entity.Player player) Checks if the player has a board.static Netherboardinstance()Returns the instance of the Netherboard class.voidremoveBoard(org.bukkit.entity.Player player) Removes the board of a player from the boards map.
WARNING: Do not use this to delete the board of a player!
-
Method Details
-
createBoard
Creates a board to a player.- Parameters:
player- the playername- the name of the board- Returns:
- the newly created board
-
createBoard
public BPlayerBoard createBoard(org.bukkit.entity.Player player, org.bukkit.scoreboard.Scoreboard scoreboard, String name) Creates a board to a player, using a predefined scoreboard.- Parameters:
player- the playerscoreboard- the scoreboard to usename- the name of the board- Returns:
- the newly created board
-
deleteBoard
public void deleteBoard(org.bukkit.entity.Player player) Deletes the board of a player.- Parameters:
player- the player
-
removeBoard
public void removeBoard(org.bukkit.entity.Player player) Removes the board of a player from the boards map.
WARNING: Do not use this to delete the board of a player!- Parameters:
player- the player
-
hasBoard
public boolean hasBoard(org.bukkit.entity.Player player) Checks if the player has a board.- Parameters:
player- the player- Returns:
trueif the player has a board, otherwisefalse
-
getBoard
Gets the board of a player.- Parameters:
player- the player- Returns:
- the player board, or null if the player has no board
-
getBoards
Gets all the boards mapped to their player. This returns a copy of the current boards map, thus modifying the given Map will not have any effect on the boards.- Returns:
- a new map with all the player boards
-
instance
Returns the instance of the Netherboard class.- Returns:
- the instance
-