⚡ Highly performant Scoreboard library for Spigot 1.7.x to 1.17.x
Highly performant Scoreboard library for Spigot 1.7.x to 1.17.x.
Credit goes to Joeleoli for the original base of this library.
public class ExamplePlugin implements JavaPlugin {
@Override
public void onEnable() {
// Start Instance.
Assemble assemble = new Assemble(this, new ExampleAssembleAdapter());
// Set Interval (Tip: 20 ticks = 1 second).
assemble.setTicks(2);
// Set Style (Tip: Viper Style starts at -1 and goes down).
assemble.setAssembleStyle(AssembleStyle.VIPER);
}
}
public class ExampleAssembleAdapter implements AssembleAdapter {
@Override
public String getTitle(Player player) {
return ChatColor.GOLD.toString() + "Assemble Board Example";
}
@Override
public List<String> getLines(Player player) {
final List<String> toReturn = new ArrayList<>();
toReturn.add("&a&lThis is a line!");
return toReturn;
}
}
public class AssembleSampleListeners implements Listener {
@EventHandler
public void onBoardCreate(AssembleBoardCreateEvent event) {
// Do what you want with the player object.
}
}
@Override
public void onEnable() {
// Start Instance.
Assemble assemble = new Assemble(this, new ExampleAssembleAdapter());
// Set Interval (Tip: 20 ticks = 1 second).
assemble.setTicks(2);
// Set Custom Style (Tip: This will set the scoreboard scores to range from 8 to -7)
assemble.setAssembleStyle(AssembleStyle.CUSTOM.descending(true).startNumber(8));
}
When contributing, please create a pull request with the branch named as follows <feature/fix>/<title>
.
To compile, run the maven command: mvn clean install
To run unit tests, run the maven command mvn test