FeatherBoard Developer API
Maven repository
<repository>
<id>mvdw-software</id>
<name>MVdW Public Repositories</name>
<url>https://repo.mvdw-software.be/content/groups/public/</url>
</repository>
<dependency>
<groupId>org.featherboard</groupId>
<artifactId>FeatherBoard-API</artifactId>
<version>6.0-SNAPSHOT</version>
</dependency>
Source code
The source code of the API can be found on GitLab.
Scoreboard API
The scoreboard API allows you to create custom scoreboards with animations, images, and more. In addition, the API enables you to hide or show the FeatherBoard scoreboard, which can be useful for mini games or other gameplay elements. The main class to interact with the API is ScoreboardManager
.
Example
java
import org.featherboard.api.FeatherBoardPlugin;
import org.featherboard.api.ScoreboardManager;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class MyPlugin extends JavaPlugin {
private ScoreboardManager scoreboardManager;
@Override
public void onEnable() {
FeatherBoardPlugin featherBoardPlugin = (FeatherBoardPlugin) getServer().getPluginManager().getPlugin("FeatherBoard");
if (featherBoardPlugin == null) {
getLogger().severe("FeatherBoard not found!");
return;
}
scoreboardManager = featherBoardPlugin.getScoreboardManager();
}
public void showScoreboard(Player player) {
scoreboardManager.showScoreboard(player, "my-scoreboard");
}
public void hideScoreboard(Player player) {
scoreboardManager.hideScoreboard(player);
}
}