-
Notifications
You must be signed in to change notification settings - Fork 14
Getting Started
JScoreboards is a wrapper around Spigot's Scoreboard API, purpose built for the features that matter most to users (teams and displaying formatted text, as opposed to the traditional Minecraft Scoreboard uses).
To get started, you'll need to integrate JScoreboards into your project using Maven or Gradle.
See the README to get Maven repository information to add it into your project.
There are 2 types of scoreboards- Global, and Per Player. You have 2 options for each of these types: functional or method based:
JGlobalScoreboard, JPerPlayerScoreboard, JGlobalMethodBasedScoreboard, JPerPlayerMethodBasedScoreboard.
The main difference is the way the scoreboard content is updated. Here's the difference between the two options:
JGlobalScoreboard scoreboard = new JGlobalScoreboard(
() -> "Title", // The title supplier
() -> { // The lines supplier
return Arrays.asList(
"Line one!",
"Line two!"
);
}
);JGlobalMethodBasedScoreboard scoreboard = new JGlobalMethodBasedScoreboard();
scoreboard.setTitle("Title");
scoreboard.setLines(
"Line one!",
"Line two!"
);It's up to you to decide which option you'd like to use- under the hood, the method based scoreboards are subclasses of their functional counterpart, and merely setup their own suppliers/functions for them.