Resource icon

2.0 ScoreboardAPI 2.1.0

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:
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" );
How to add a score:
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 );
How to remove a score:
Java:
DisplayEntry positionEntry = scoreboardDisplay.addLine( "X: " + player.getFloorX() + " Y: " + player.getFloorY() + " Z: " + player.getFloorZ(), 4 );
scoreboardDisplay.removeEntry( positionEntry );
How to set a scoreboard for the player:
Java:
ScoreboardAPI.setScoreboard( player, scoreboard );
How to remove the scoreboard:
Java:
ScoreboardAPI.removeScorebaord( player, scoreboard );
How to update a score:
Java:
scoreboardDisplay.removeEntry( positionEntry );
scoreboardDisplay.addLine( "X: " + player.getFloorX() + " Y: " + player.getFloorY() + " Z: " + player.getFloorZ(), 4 );
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.
  • Like
Reactions: zixuan007
Author
LucGamesHD
Downloads
3,636
Views
8,803
First release
Last update
Rating
3.67 star(s) 3 ratings

More resources from LucGamesHD

Latest updates

  1. Update the ScoreboardAPI for the new nukkit 2.0 networking.

    This ScoreboardAPI now works with the Nukkit 2.0 (New Networking) the API is the same. If you...

Latest reviews

https://hasteb.in/rexakuca.gradle

Gets that error on startup.
LucGamesHD
LucGamesHD
Did you use the plugin with the Nukkit 1.0 or with the 2.0 ? The plugin for Nukkit 2.0 is the version for 1.0 you can find here -> https://github.com/LucGamesYT/ScoreboardAPI/releases/tag/1.0.0

If you have further questions you can contact me on Discord: LucGamesHD#2202
Good, but please update ist outdated at the moment.
LucGamesHD
LucGamesHD
The plugin is already up to date for nukkit 2.0 for 1.0 please use this ->https://github.com/LucGamesYT/ScoreboardAPI/releases/tag/1.0.0
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
Top