Язык

Simple Scoreboard Library ! (Only for Java Developers)

SpigotMC

A simple Library to create Scoreboards without the use of complex packet system.

848 загрузок 5.0 рейтинг
последняя v2.3 SpigotMC
1.8 – 1.16

! 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 :

Code (Text):
package fr.myplugin.utils;
4) If you haven't errors reported by your IDE, you can close this class and "forget it".

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 :
Code (Text):
 
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.
*/

 
[​IMG]

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 :
Code (Text):
   
public Map<Player, ScoreboardSign> boards = new HashMap<>();

for (Entry<Player, ScoreboardSign> board : boards.entrySet()) {
    boards.getValue().setLine(3, "§8play.myserver.net");
}
 
[​IMG]

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 :/.

Версии

Release
2.3
·
121
Release
2.2
·
24
Release
2.2
·
6
Release
2.1
·
46
Release
2.0
·
14
Release
1.0
·
142

Комментарии 0

Пока нет комментариев. Будь первым, кто поделится мнением.

Скачать Simple Scoreboard Library ! (Only for Java Developers)

Файлы отдаются напрямую с первоисточника. Modgrid не хранит и не изменяет их.