A lightweight library to ease the creation of scoreboards in the video game Minecraft.
Enter the following in your terminal.
git clone https://github.com/brarsanmol/Zeus.git
cd Zeus
mvn clean install
Insert the following snippet into your pom.xml.
<dependency>
<groupId>ca.anmolbrar</groupId>
<artifactId>Zeus</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Zeus makes use of the Adapter pattern to implement the scoreboard. The code sample below is an basic implementation to show you how to get up and running with the library.
public class ExamplePlugin extends JavaPlugin {
private Zeus zeus;
@Override
public void onEnable() {
[...]
this.zeus = new Zeus(this, new SidebarAdapterImpl());
}
@Override
public void onDisable() {
[...]
this.zeus = null;
}
}
public class SidebarAdapterImpl implements SidebarAdapter {
@Override
public String getTitle() {
return "Example";
}
@Override
public List<String> getLines(Player player) {
var lines = new ArrayList<String>();
lines.add("Line 1");
lines.add("Line 2");
lines.add("Line 3");
lines.add("Line 4");
return lines;
}
}
- Java 14
- Spigot
- Lombok