Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 1.76 KB

File metadata and controls

69 lines (52 loc) · 1.76 KB

Logo

RealScoreboard - Best scoreboard plugin.


1. Repository

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' }

2. Dependency

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'

3. Usage

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

Links