项目作者: MinusKube

项目描述 :
Scoreboard API for your Minecraft Sponge and Bukkit Plugins.
高级语言: Java
项目地址: git://github.com/MinusKube/Netherboard.git
创建时间: 2017-05-01T19:27:06Z
项目社区:https://github.com/MinusKube/Netherboard

开源协议:Apache License 2.0

下载


Netherboard

Scoreboard API for your Minecraft Sponge and Bukkit Plugins.
You can use this as a Plugin, or just add it to your dependencies.

Features:

  • Works for all the Bukkit versions since 1.7 (even 1.17!).
  • Works with Sponge! (Tell me if a version is not compatible)
  • No blinking!
  • Max characters per line:
    • 1.7: 16 (Working on it to allow 48 characters)
    • 1.8+: 40 (Working on it to allow 72 characters, not sure if possible, we’ll see)

TODO:

  • Allow more characters per line (Using teams)

Examples:

Bukkit

Create a board:

  1. BPlayerBoard board = Netherboard.instance().createBoard(player, "My Scoreboard");

Create a board with your own Scoreboard object:

  1. BPlayerBoard board = Netherboard.instance().createBoard(player, scoreboard, "My Scoreboard");

Get a player’s board:

  1. BPlayerBoard board = Netherboard.instance().getBoard(player);

When you have your board, you can do whatever you want with it:

  1. // Set a line
  2. // If there is already a line with this score, it will replace it.
  3. board.set("Test Score", 5);
  4. // Set all the lines
  5. // This will remove all the existing lines then set the new ones
  6. board.setAll(
  7. "First Line",
  8. "Second Line",
  9. "Third Line",
  10. "Fourth Line",
  11. "Fifth Line"
  12. );
  13. // Get a line from its score
  14. board.get(5);
  15. // Remove a line
  16. board.remove(5);
  17. // Change the name of the board
  18. board.setName("My New Scoreboard");
  19. // Clear the board
  20. board.clear();
  21. // Delete the board
  22. board.delete();

Sponge

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.

Usage

To use the Netherboard API, either:

  • put it in the 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.
  • add it to the dependencies in your IDE and include it in your plugin jar.

You can download the latest version on the Releases page on Github.

You can also use a build system:

Gradle

  1. repositories {
  2. mavenCentral()
  3. }
  4. dependencies {
  5. compile 'fr.minuskube:netherboard-bukkit:1.2.3'
  6. // Or if you use Sponge:
  7. // compile 'fr.minuskube:netherboard-sponge:1.2.3'
  8. }

Maven

  1. <dependency>
  2. <groupId>fr.minuskube</groupId>
  3. <artifactId>netherboard-bukkit</artifactId>
  4. <!--
  5. Or if you use Sponge:
  6. <artifactId>netherboard-sponge</artifactId>
  7. -->
  8. <version>1.2.3</version>
  9. </dependency>

Issues:

If you have a problem with the API, or you want to request a feature, make an issue here.