Scoreboard API for your Minecraft Sponge and Bukkit Plugins, supporting all versions from 1.7 to 1.19.
APACHE-2.0 License
Scoreboard API for your Minecraft Sponge and Bukkit Plugins. You can use this as a Plugin, or just add it to your dependencies.
Create a board:
BPlayerBoard board = Netherboard.instance().createBoard(player, "My Scoreboard");
Create a board with your own Scoreboard object:
BPlayerBoard board = Netherboard.instance().createBoard(player, scoreboard, "My Scoreboard");
Get a player's board:
BPlayerBoard board = Netherboard.instance().getBoard(player);
When you have your board, you can do whatever you want with it:
// Set a line
// If there is already a line with this score, it will replace it.
board.set("Test Score", 5);
// Set all the lines
// This will remove all the existing lines then set the new ones
board.setAll(
"First Line",
"Second Line",
"Third Line",
"Fourth Line",
"Fifth Line"
);
// Get a line from its score
board.get(5);
// Remove a line
board.remove(5);
// Change the name of the board
board.setName("My New Scoreboard");
// Clear the board
board.clear();
// Delete the board
board.delete();
Same thing than Bukkit, but the object is called SPlayerBoard
and the methods requires Text
objects instead of String
ones.
NB: With Sponge, please do not create boards for different players with the same scoreboard
.
To use the Netherboard API, either:
plugins
folder of your server, add it to your dependencies in your plugin.yml (e.g. depend: [Netherboard]
) and add it to the dependencies in your IDE.You can download the latest version on the Releases page on Github.
You can also use a build system:
repositories {
mavenCentral()
}
dependencies {
compile 'fr.minuskube:netherboard-bukkit:1.2.3'
// Or if you use Sponge:
// compile 'fr.minuskube:netherboard-sponge:1.2.3'
}
<dependency>
<groupId>fr.minuskube</groupId>
<artifactId>netherboard-bukkit</artifactId>
<!--
Or if you use Sponge:
<artifactId>netherboard-sponge</artifactId>
-->
<version>1.2.3</version>
</dependency>
If you have a problem with the API, or you want to request a feature, make an issue here.