Class BedSumoAPIProvider

java.lang.Object
eu.bedwarsia.bedsumo.api.BedSumoAPIProvider
All Implemented Interfaces:
BedSumoAPI

public final class BedSumoAPIProvider extends Object implements BedSumoAPI
  • Method Details

    • register

      public static void register(eu.bedwarsia.bedsumo.BedSumo plugin)
    • unregister

      public static void unregister()
    • getInstance

      public static BedSumoAPI getInstance()
    • getPlayerLanguage

      public String getPlayerLanguage(UUID playerUuid)
      Description copied from interface: BedSumoAPI
      Get the current language code assigned to a player (e.g. "en", "fr"). Defaults to "en".
      Specified by:
      getPlayerLanguage in interface BedSumoAPI
    • setPlayerLanguage

      public void setPlayerLanguage(UUID playerUuid, String languageCode)
      Description copied from interface: BedSumoAPI
      Sets the persistent language code for a player.
      Specified by:
      setPlayerLanguage in interface BedSumoAPI
    • getAvailableLanguages

      public List<String> getAvailableLanguages()
      Description copied from interface: BedSumoAPI
      Returns a list of all loaded language identifiers available on this server.
      Specified by:
      getAvailableLanguages in interface BedSumoAPI
    • translate

      public String translate(org.bukkit.entity.Player player, String messageKey, Object... placeholders)
      Description copied from interface: BedSumoAPI
      Translates a message key into the target player's chosen language format with correct color codes and placeholder insertion.
      Specified by:
      translate in interface BedSumoAPI
    • getPlayerStats

      public PlayerStats getPlayerStats(UUID playerUuid)
      Description copied from interface: BedSumoAPI
      Blocks to fetch recent player stats from current database state.
      Specified by:
      getPlayerStats in interface BedSumoAPI
    • getPlayerStatsAsync

      public CompletableFuture<PlayerStats> getPlayerStatsAsync(UUID playerUuid)
      Description copied from interface: BedSumoAPI
      Fetch player stats in a separate thread.
      Specified by:
      getPlayerStatsAsync in interface BedSumoAPI
    • getTopKills

      public List<PlayerStats> getTopKills(int limit)
      Description copied from interface: BedSumoAPI
      Retrieves the current leaderboard configuration for Top Kills.
      Specified by:
      getTopKills in interface BedSumoAPI
    • getTopDeaths

      public List<PlayerStats> getTopDeaths(int limit)
      Description copied from interface: BedSumoAPI
      Retrieves the current leaderboard configuration for Top Deaths.
      Specified by:
      getTopDeaths in interface BedSumoAPI
    • getCurrentKillstreak

      public int getCurrentKillstreak(org.bukkit.entity.Player player)
      Description copied from interface: BedSumoAPI
      Returns the current live in-memory session killstreak of a player.
      Specified by:
      getCurrentKillstreak in interface BedSumoAPI
    • getLiveStats

      public LivePlayerStats getLiveStats(UUID playerUuid)
      Description copied from interface: BedSumoAPI
      Returns internal BedSumo live Stats object cached in server memory. (Will update constantly as user moves/kills during matches).
      Specified by:
      getLiveStats in interface BedSumoAPI
    • isBuildMode

      public boolean isBuildMode(org.bukkit.entity.Player player)
      Description copied from interface: BedSumoAPI
      Checks if a user currently has administrative build mode enabled.
      Specified by:
      isBuildMode in interface BedSumoAPI
    • setBuildMode

      public void setBuildMode(org.bukkit.entity.Player player, boolean state)
      Description copied from interface: BedSumoAPI
      Explicitly enable/disable administrative building mode for a player.
      Specified by:
      setBuildMode in interface BedSumoAPI
    • reloadConfiguration

      public void reloadConfiguration()
      Description copied from interface: BedSumoAPI
      Triggers system-wide configuration reloading.
      Specified by:
      reloadConfiguration in interface BedSumoAPI
    • getArenaSpawnpoints

      public List<org.bukkit.Location> getArenaSpawnpoints()
      Description copied from interface: BedSumoAPI
      Retrieves immutable snapshot of preconfigured arena fallback spawnpoints.
      Specified by:
      getArenaSpawnpoints in interface BedSumoAPI
    • getBedOwner

      public UUID getBedOwner(org.bukkit.Location location)
      Description copied from interface: BedSumoAPI
      Retrieves the UUID of the player who placed this bed, if actively tracked.
      Specified by:
      getBedOwner in interface BedSumoAPI
    • getActiveBedCount

      public int getActiveBedCount()
      Description copied from interface: BedSumoAPI
      Returns active placed bed blocks currently awaiting timeouts.
      Specified by:
      getActiveBedCount in interface BedSumoAPI
    • setScoreboardVisible

      public void setScoreboardVisible(org.bukkit.entity.Player player, boolean visible)
      Description copied from interface: BedSumoAPI
      Toggles dynamic rendering of the BedSumo objective sidebar for a user.
      Specified by:
      setScoreboardVisible in interface BedSumoAPI