Interface BetterHudBootstrap


public interface BetterHudBootstrap
A boot code of BetterHud.
  • Method Details

    • logger

      @NotNull @NotNull BetterHudLogger logger()
      Gets a logger.
      Returns:
      logger
    • dataFolder

      @NotNull @NotNull File dataFolder()
      Gets data folder of BetterHud.
      Returns:
      data folder
    • console

      @NotNull @NotNull net.kyori.adventure.audience.Audience console()
      Gets console.
      Returns:
      console
    • core

      @NotNull @NotNull BetterHud core()
      Gets a BetterHud's main instance.
      Returns:
      BetterHud
    • jarFile

      @NotNull @NotNull File jarFile()
      Gets the file of BetterHud's jar file.
      Returns:
      jar
    • version

      @NotNull @NotNull String version()
      Gets a minecraft version of this platform.
      Returns:
      platform version.
    • scheduler

      @NotNull @NotNull HudScheduler scheduler()
      Gets wrapped scheduler.
      Returns:
      scheduler
    • volatileCode

      @NotNull @NotNull VolatileCodeHandler volatileCode()
      Gets a volatile code. Bukkit - NMS Velocity - Proxy
      Returns:
      volatile code
    • resource

      @Nullable @Nullable InputStream resource(@NotNull @NotNull String path)
      Gets a resource of jar file.
      Parameters:
      path - file name
      Returns:
      jar file stream or null if not exists
    • classloader

      @NotNull @NotNull URLClassLoader classloader()
      Gets BetterHud's boot classloader.
      Returns:
      class loader.
    • isPaper

      boolean isPaper()
      Whether this platform is Paper or that's fork.
      Returns:
      whether this platform is Paper
    • isFolia

      boolean isFolia()
      Whether this platform is Folia or that's fork.
      Returns:
      whether this platform is Folia
    • isVelocity

      boolean isVelocity()
      Whether this platform is Velocity or that's fork.
      Returns:
      whether this platform is Velocity
    • isFabric

      boolean isFabric()
      Whether this platform is Fabric
      Returns:
      whether this platform is Fabric
    • startMetrics

      void startMetrics()
      Starts BStats metrics.
    • endMetrics

      void endMetrics()
      Ends BStats metrics.
    • sendResourcePack

      void sendResourcePack(@NotNull @NotNull HudPlayer player)
      Sends resource pack url packet to that player.
      Parameters:
      player - target player
    • sendResourcePack

      void sendResourcePack()
      Sends resource pack url packet to all players.
    • minecraftVersion

      @NotNull @NotNull MinecraftVersion minecraftVersion()
      Target platform's minecraft protocol version.
      Returns:
      version like "1.21.8"
    • mcmetaVersion

      int mcmetaVersion()
      A resource pack version matched at target platform's minecraft.
      Returns:
      resource pack version
    • world

      @Nullable @Nullable WorldWrapper world(@NotNull @NotNull String name)
      Finds some world by given name.
      Parameters:
      name - world name
      Returns:
      wrapper of a world or null if not exists.
    • worlds

      @NotNull @NotNull @Unmodifiable List<WorldWrapper> worlds()
      Returns all world's wrapper.
      Returns:
      a collection of all world.
    • loaderName

      @NotNull default @NotNull String loaderName()
      Gets loader name.
      Returns:
      loader name
    • consoleSource

      @NotNull default @NotNull kr.toxicity.command.BetterCommandSource consoleSource()
      Gets a command source based on console.
      Returns:
      console command source.