- Compatible API Versions
- 2.0
- Sourcecode
- https://github.com/LucGamesYT/ScoreboardAPI
- Contributors
- LucGamesHD
New version!
I release the ScoreboardAPI for Nukkit 2.0! The old version of the ScoreboardAPI for nukkit 1.0+ is only available on GitHub.
Repository & Dependency:
Hot to use:
How to create a scoreboard:
How to add a score:
How to remove a score:
How to set a scoreboard for the player:
How to remove the scoreboard:
How to update a score:
Important!
The only thing I changed is the package. The package changes from "de.theamychan.scoreboard" to "de.lucgameshd.scoreboard" because I have a new username. The ScoreboardAPI for nukkit 1.0 is still the old package.
I release the ScoreboardAPI for Nukkit 2.0! The old version of the ScoreboardAPI for nukkit 1.0+ is only available on GitHub.
Repository & Dependency:
XML:
<repository>
<id>releases</id>
<url>http://lucgameshd.de:8081/content/repositories/releases</url>
</repository>
<dependency>
<groupId>de.lucgameshd</groupId>
<artifactId>ScoreboardAPI</artifactId>
<version>2.1</version>
</dependency>
Hot to use:
How to create a scoreboard:
Java:
Scoreboard scoreboard = ScoreboardAPI.createScoreboard();
ScoreboardDisplay scoreboardDisplay = scoreboard.addDisplay( DisplaySlot.SIDEBAR, "objectivename", "title" );
Java:
scoreboardDisplay.addLine( "This is a line in a score", 0 );
scoreboardDisplay.addLine( "§a", 1 ); //free space
scoreboardDisplay.addLine( "Name: " + player.getName(), 2 );
scoreboardDisplay.addLine( "§b", 3); //free space
DisplayEntry positionEntry = scoreboardDisplay.addLine( "X: " + player.getFloorX() + " Y: " + player.getFloorY() + " Z: " + player.getFloorZ(), 4 );
Java:
DisplayEntry positionEntry = scoreboardDisplay.addLine( "X: " + player.getFloorX() + " Y: " + player.getFloorY() + " Z: " + player.getFloorZ(), 4 );
scoreboardDisplay.removeEntry( positionEntry );
Java:
ScoreboardAPI.setScoreboard( player, scoreboard );
Java:
ScoreboardAPI.removeScorebaord( player, scoreboard );
Java:
scoreboardDisplay.removeEntry( positionEntry );
scoreboardDisplay.addLine( "X: " + player.getFloorX() + " Y: " + player.getFloorY() + " Z: " + player.getFloorZ(), 4 );
The only thing I changed is the package. The package changes from "de.theamychan.scoreboard" to "de.lucgameshd.scoreboard" because I have a new username. The ScoreboardAPI for nukkit 1.0 is still the old package.
If you have further questions you can contact me on Discord: LucGamesHD#2202