Package org.geysermc.geyser
Interface GeyserBootstrap
public interface GeyserBootstrap
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturn the data folder where files get storedInformation used for the bootstrap section of the debug dumpReturns the current CommandManagerReturns the current GeyserConfigurationReturns the current GeyserLogger@Nullable IGeyserPingPassthroughReturns the current PingPassthrough managerdefault Pathdefault @Nullable StringReturns the Minecraft version currently being used on the server.default @Nullable InputStreamgetResourceOrNull(String resource) Get an InputStream for the given resource path.default @NonNull InputStreamgetResourceOrThrow(@NonNull String resource) Get an InputStream for the given resource path, throws AssertionError if resource is not found.default Path@NonNull Stringintdefault @Nullable SocketAddressdefault WorldManagerReturns the current WorldManagervoidCalled when the GeyserBootstrap is disabled - either before a reload, of before fully shutting down.voidCalled when the GeyserBootstrap is enabled/reloaded.voidCalled when the GeyserBootstrap is initialized.voidCalled when the GeyserBootstrap is shutting down.booleanTests if Floodgate is installed, loads the Floodgate key if so, and returns the result of Floodgate installed.
-
Field Details
-
DEFAULT_CHUNK_MANAGER
-
-
Method Details
-
onGeyserInitialize
void onGeyserInitialize()Called when the GeyserBootstrap is initialized. This will only be called once, when Geyser is loading. Calling this must happen beforeonGeyserEnable(), since this "sets up" Geyser. -
onGeyserEnable
void onGeyserEnable()Called when the GeyserBootstrap is enabled/reloaded. This starts Geyser, after which, Geyser is in a player-accepting state. -
onGeyserDisable
void onGeyserDisable()Called when the GeyserBootstrap is disabled - either before a reload, of before fully shutting down. -
onGeyserShutdown
void onGeyserShutdown()Called when the GeyserBootstrap is shutting down. -
getGeyserConfig
GeyserConfiguration getGeyserConfig()Returns the current GeyserConfiguration- Returns:
- The current GeyserConfiguration
-
getGeyserLogger
GeyserLogger getGeyserLogger()Returns the current GeyserLogger- Returns:
- The current GeyserLogger
-
getGeyserCommandManager
GeyserCommandManager getGeyserCommandManager()Returns the current CommandManager- Returns:
- The current CommandManager
-
getGeyserPingPassthrough
@Nullable IGeyserPingPassthrough getGeyserPingPassthrough()Returns the current PingPassthrough manager- Returns:
- The current PingPassthrough manager
-
getWorldManager
Returns the current WorldManager- Returns:
- the current WorldManager
-
getConfigFolder
Path getConfigFolder()Return the data folder where files get stored- Returns:
- Path location of data folder
-
getSavedUserLoginsFolder
- Returns:
- the folder where user tokens are saved. This should always point to the location of the config.
-
getDumpInfo
BootstrapDumpInfo getDumpInfo()Information used for the bootstrap section of the debug dump- Returns:
- The info about the bootstrap
-
getMinecraftServerVersion
Returns the Minecraft version currently being used on the server. This should be only be implemented on platforms that have direct server access - platforms such as proxies always have to be on their latest version to support the newest Minecraft version, but older servers can use ViaVersion to enable newer versions to join.
If used, this should not be null beforeGeyserImplinitialization.- Returns:
- the Minecraft version being used on the server, or
nullif not applicable
-
getSocketAddress
-
getLogsPath
-
getResourceOrNull
Get an InputStream for the given resource path. Overridden on platforms that have different class loader properties.- Parameters:
resource- Resource to get- Returns:
- InputStream of the given resource, or null if not found
-
getResourceOrThrow
Get an InputStream for the given resource path, throws AssertionError if resource is not found.- Parameters:
resource- Resource to get- Returns:
- InputStream of the given resource
-
getServerBindAddress
@NonNull String getServerBindAddress()- Returns:
- the bind address being used by the Java server.
-
getServerPort
int getServerPort()- Returns:
- the listening port being used by the Java server. -1 if can't be found
-
testFloodgatePluginPresent
boolean testFloodgatePluginPresent()Tests if Floodgate is installed, loads the Floodgate key if so, and returns the result of Floodgate installed.
-