Class ScoreboardRegistry

java.lang.Object
com.xyrisdev.cloud.api.scoreboard.ScoreboardRegistry

public final class ScoreboardRegistry extends Object
  • 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

      public static ScoreboardAdapter get(@NotNull @NotNull ScoreboardType type)
      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.