API interface for interacting with EssentialsC's scoreboard system. Provides
control over per-player scoreboard visibility and global system state.
Scoreboards are configured in config.yml and update asynchronously
with placeholder support.
Retrieve an instance via EssentialsCAPI.getScoreboardApi().
ScoreboardApi sb = APIProvider.getAPI().getScoreboardApi();
if (sb.isEnabled(player)) {
sb.toggle(player);
}
All state changes persist across sessions if persistence is enabled in config.
Method Summary
| void |
toggle(Player player) Toggles the scoreboard visibility for the given player. |
| boolean |
isEnabled(Player player) Returns whether the scoreboard is currently enabled for the given player. |
| boolean |
isGloballyEnabled() Returns whether the scoreboard system is globally enabled in config. |
| void |
reload() Reloads the scoreboard configuration from disk. |
Toggles the scoreboard visibility for the given player.
If the scoreboard is currently shown, it will be hidden and the player is added to the disabled list. If hidden, it will be shown. Persists across sessions if persistence is enabled in config.
| player | the player to toggle; must not be null |
Returns whether the scoreboard is currently enabled for the given player.
Returns false if the player has toggled it off, even if the global system is enabled.
| player | the player to check; must not be null |
| boolean | true if the player has the scoreboard visible |
Returns whether the scoreboard system is globally enabled in config.
Returns:| boolean | true if scoreboards are enabled server-wide |
Reloads the scoreboard configuration from disk.
Re-reads config.yml, stops all current scoreboards, and restarts them with the new configuration. This is equivalent to /scoreboard reload.