RealScoreboard API is hosted on jitpack.
- Maven
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>- Gradle (Groovy)
maven { url 'https://jitpack.io' }Only API module should be used. Available versions can be found on Jitpack page. If you need access to internals you need to add plugin dependency yourself or use reflections.
- Maven
<dependency>
<groupId>com.github.joserodpt.RealScoreboard</groupId>
<artifactId>realscoreboard-api</artifactId>
<version>VERSION</version>
</dependency>- Gradle (Groovy)
implementation 'com.github.joserodpt.RealScoreboard:realscoreboard-api:VERSION'You can obtain the API instance like this:
final var api = RealScoreboardAPI.getInstance();From there you can access different managers and classes. These are visible as interfaces or abstract classes, so you can only use the exposed methods.
Here is example usage:
final var databaseManager = this.scoreboardAPI.getDatabaseManager(); // Getting DatabaseManager
final var playerData = databaseManager.getPlayerData(player.getUniqueId()); // Getting player data from DatabaseManager
playerData.setScoreboardON(false); // Disabling scoreboard for player
databaseManager.savePlayerData(playerData, true); // Saving changes (asynchronously) to database