Interface BetterHudBootstrap
public interface BetterHudBootstrap
A boot code of BetterHud.
-
Method Summary
Modifier and TypeMethodDescription@NotNull URLClassLoaderGets BetterHud's boot classloader.@NotNull net.kyori.adventure.audience.Audienceconsole()Gets console.default @NotNull kr.toxicity.command.BetterCommandSourceGets a command source based on console.@NotNull BetterHudcore()Gets a BetterHud's main instance.@NotNull FileGets data folder of BetterHud.voidEnds BStats metrics.booleanisFabric()Whether this platform is FabricbooleanisFolia()Whether this platform is Folia or that's fork.booleanisPaper()Whether this platform is Paper or that's fork.booleanWhether this platform is Velocity or that's fork.@NotNull FilejarFile()Gets the file of BetterHud's jar file.default @NotNull StringGets loader name.@NotNull BetterHudLoggerlogger()Gets a logger.intA resource pack version matched at target platform's minecraft.@NotNull MinecraftVersionTarget platform's minecraft protocol version.@Nullable InputStreamGets a resource of jar file.@NotNull HudSchedulerGets wrapped scheduler.voidSends resource pack url packet to all players.voidsendResourcePack(@NotNull HudPlayer player) Sends resource pack url packet to that player.voidStarts BStats metrics.@NotNull Stringversion()Gets a minecraft version of this platform.@NotNull VolatileCodeHandlerGets a volatile code.@Nullable WorldWrapperFinds some world by given name.@NotNull @Unmodifiable List<WorldWrapper> worlds()Returns all world's wrapper.
-
Method Details
-
logger
-
dataFolder
-
console
@NotNull @NotNull net.kyori.adventure.audience.Audience console()Gets console.- Returns:
- console
-
core
-
jarFile
-
version
Gets a minecraft version of this platform.- Returns:
- platform version.
-
scheduler
-
volatileCode
Gets a volatile code. Bukkit - NMS Velocity - Proxy- Returns:
- volatile code
-
resource
Gets a resource of jar file.- Parameters:
path- file name- Returns:
- jar file stream or null if not exists
-
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
Sends resource pack url packet to that player.- Parameters:
player- target player
-
sendResourcePack
void sendResourcePack()Sends resource pack url packet to all players. -
minecraftVersion
Target platform's minecraft protocol version.- Returns:
- version like "1.21.11"
-
mcmetaVersion
int mcmetaVersion()A resource pack version matched at target platform's minecraft.- Returns:
- resource pack version
-
world
Finds some world by given name.- Parameters:
name- world name- Returns:
- wrapper of a world or null if not exists.
-
worlds
Returns all world's wrapper.- Returns:
- a collection of all world.
-
loaderName
-
consoleSource
@NotNull default @NotNull kr.toxicity.command.BetterCommandSource consoleSource()Gets a command source based on console.- Returns:
- console command source.
-