Class ScoreboardRegistry
java.lang.Object
com.xyrisdev.cloud.api.scoreboard.ScoreboardRegistry
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScoreboardAdapter
get
(@NotNull ScoreboardType type) Retrieves the scoreboard adapter associated with the given scoreboard type.static void
register
(@NotNull ScoreboardType type, @NotNull ScoreboardAdapter adapter) Registers a scoreboard adapter for a given scoreboard type.
-
Method Details
-
register
public static void register(@NotNull @NotNull ScoreboardType type, @NotNull @NotNull ScoreboardAdapter adapter) Registers a scoreboard adapter for a given scoreboard type.This method allows adding a custom adapter for a specific type of scoreboard (e.g., DUEL, SPECTATOR).
- Parameters:
type
- The type of scoreboard (e.g., DUEL, SPECTATOR).adapter
- The adapter to be registered for the given scoreboard type.
-
get
Retrieves the scoreboard adapter associated with the given scoreboard type.This method allows retrieving the appropriate adapter to handle the scoreboard for the specified type.
- Parameters:
type
- The type of scoreboard (e.g., DUEL, SPECTATOR).- Returns:
- The corresponding scoreboard adapter for the given type, or null if no adapter is registered.
-