Simple Scoreboard Library ! (Only for Java Developers)
SpigotMCA simple Library to create Scoreboards without the use of complex packet system.
! IMPORTANT :
This library is only for Java Developers. If you want to use an unsupported version, ask me. This is a fork of the zyuiop's original project, the author gave up this library and I would want to update it and make it work with the newest versions of Mineraft.
: IMPORTANT !
Legacy version (1.8 - 1.12.2) https://gist.githubusercontent.com/...66fccbebbb550f0d1c6724641/ScoreboardSign.java
Latest version (1.13.2+) Use download button
Original project ->
https://gist.github.com/zyuiop/8fcf2ca47794b92d7caa / https://gist.github.com/WeiiswurstDev/8e9a6fd0f8eaaa57c2c0fc2ed9fcd0fb (special thanks to @Matocolotoe & @Weiiswurst for their contributions)
How to use :
1) Firtsly, download the .zip archive available on this page.
2) Decompile it and keep the file inside.
3) Add this file to your Bukkit/Spigot/Paper project in your main package, open it and write its name in the top of the class (first line).
Example :
5) Add ProtocolLib to your plugins and add it to your plugin, as a dependency : https://github.com/dmulloy2/ProtocolLib/#using-protocollib
6) Here's now how to create a scoreboard, this code could be pasted after an event, a command...
Example :
public Map<Player, ScoreboardSign> boards = new HashMap<>();
ScoreboardSign sb = new ScoreboardSign(Player, "§4SimpleBoard");
sb.create();
sb.setLine(3, "§0"); //-> Important not to leave empty, color code helps to avoid issues//
sb.setLine(2, "§2Player §f: §a10 / 25");
sb.setLine(1, "§1");
sb.setLine(0, "§7play.myserver.fr");
//...//
boards.put(Player, sb); //-> Important to update after//
/**
* Until line 15 !
* Limitation of the game.
*/
7) To update the scoreboard, you have just to store the board by player with an HashMap for example, and to modify the line that you want :
Example :
public Map<Player, ScoreboardSign> boards = new HashMap<>();
for (Entry<Player, ScoreboardSign> board : boards.entrySet()) {
boards.getValue().setLine(3, "§8play.myserver.net");
}
Support :
Contact me in private with any bugs ONLY about the class ScoreboardSign.java or if you have troubles with the use of this Library

Enjoy that and send me your feedback !
This presentation will evolve over time and your suggestions / requests.
I am very sorry if I made a few mistakes in my sentences, I am french :/.
Kommentare 0
Noch keine Kommentare. Sei der Erste, der seine Meinung teilt.