Interface BvManager


@NullMarked public interface BvManager
Exposes a thread-safe API for getting player states and dimension states managed by BetterView.
  • Method Summary

    Modifier and Type
    Method
    Description
    getLevel(net.kyori.adventure.key.Key dimensionName)
    This method will always return a level instance and may create a new one if none exists.
    default BvPlayer
    getPlayer(UUID playerId)
     
    @Nullable BvPlayer
    This method will always return a player instance if the player is currently connected to the platform and may create a new one if the player doesn't exist yet.
    boolean
    hasLevel(net.kyori.adventure.key.Key dimensionName)
     
  • Method Details

    • hasLevel

      boolean hasLevel(net.kyori.adventure.key.Key dimensionName)
      Returns:
      whether BetterView has encountered a player with the specified dimension name before.
    • getLevel

      BvLevel getLevel(net.kyori.adventure.key.Key dimensionName) throws IllegalArgumentException
      This method will always return a level instance and may create a new one if none exists.
      Parameters:
      dimensionName - the namespaced name of the level (e.g. "minecraft:overworld")
      Returns:
      the level managed by BetterView.
      Throws:
      IllegalArgumentException - if the level can't be found
    • getPlayerOrNull

      @Nullable BvPlayer getPlayerOrNull(UUID playerId)
      This method will always return a player instance if the player is currently connected to the platform and may create a new one if the player doesn't exist yet.
      Parameters:
      playerId - the UUID of the Minecraft player profile.
      Returns:
      the player managed by BetterView or null if the player doesn't exist on the platform.
    • getPlayer

      default BvPlayer getPlayer(UUID playerId) throws IllegalArgumentException
      Throws:
      IllegalArgumentException - if getPlayerOrNull(UUID) returns null.
      See Also: