Package me.hsgamer.hscore.minestom.board
Class Board
java.lang.Object
me.hsgamer.hscore.minestom.board.Board
A simple scoreboard for Minestom.
Call
hook(EventNode) when the server is starting up to make sure the feature work properly.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlayer(net.minestom.server.entity.Player player) Add the player to the boardstatic voidhook(net.minestom.server.event.EventNode<net.minestom.server.event.Event> node) Hook the board event to the event node.voidRemove all the players from the boardvoidremovePlayer(net.minestom.server.entity.Player player) Remove the player from the boardbooleanupdate(net.minestom.server.entity.Player player) Update the board for the playervoidUpdate the board for all the players
-
Constructor Details
-
Method Details
-
hook
public static void hook(net.minestom.server.event.EventNode<net.minestom.server.event.Event> node) Hook the board event to the event node. Call the method when the server is starting up to hook the event and make sure the function work properly.- Parameters:
node- the event node
-
addPlayer
public void addPlayer(net.minestom.server.entity.Player player) Add the player to the board- Parameters:
player- the player
-
removePlayer
public void removePlayer(net.minestom.server.entity.Player player) Remove the player from the board- Parameters:
player- the player
-
removeAll
public void removeAll()Remove all the players from the board -
update
public boolean update(net.minestom.server.entity.Player player) Update the board for the player- Parameters:
player- the player- Returns:
- true if the board was updated, false if the player is not in the board
-
updateAll
public void updateAll()Update the board for all the players
-