Package org.geysermc.geyser
Class GeyserImpl
java.lang.Object
org.geysermc.geyser.GeyserImpl
- All Implemented Interfaces:
org.geysermc.api.GeyserApiBase,org.geysermc.geyser.api.GeyserApi
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@NonNull org.geysermc.geyser.api.network.BedrockListenerint@NonNull GeyserCommandManager@NonNull Path@Nullable GeyserSessionconnectionByUuid(@NonNull UUID uuid) @Nullable GeyserSessionconnectionByXuid(@NonNull String xuid) @NonNull org.geysermc.geyser.api.command.CommandSource@NonNull org.geysermc.geyser.api.network.RemoteServervoiddisable()@NonNull org.geysermc.geyser.api.event.EventBus<org.geysermc.geyser.api.event.EventRegistrar>eventBus()@NonNull GeyserExtensionManagerorg.geysermc.floodgate.crypto.FloodgateCipherorg.geysermc.geyser.api.event.EventBus<org.geysermc.geyser.api.event.EventRegistrar>static GeyserImplorg.geysermc.geyser.api.util.PlatformTypevoidbooleanisBedrockPlayer(@NonNull UUID uuid) booleanDetermines if Geyser is currently enabled.booleanReturns false if this Geyser instance is running in an IDE.booleanDetermines if we're currently reloading.booleanstatic GeyserImplload(org.geysermc.geyser.api.util.PlatformType platformType, GeyserBootstrap bootstrap) @NonNull List<GeyserSession>int@NonNull Path@NonNull org.geysermc.geyser.api.util.PlatformType<R extends T,T>
@NonNull R@Nullable StringrefreshTokenFor(@NonNull String bedrockName) voidvoidsaveRefreshToken(@NonNull String bedrockName, @NonNull String refreshToken) booleanbooleansendForm(@NonNull UUID uuid, @NonNull org.geysermc.cumulus.form.util.FormBuilder<?, ?, ?> formBuilder) voidsetEnabled(boolean isEnabled) Determines if Geyser is currently enabled.static voidsetShouldStartListener(boolean shouldStartListener) This is used in GeyserConnect to stop the bedrock server binding to a portvoidsetShuttingDown(boolean shuttingDown) voidshutdown()static voidstart()@NonNull List<org.geysermc.geyser.api.util.MinecraftVersion>@NonNull org.geysermc.geyser.api.util.MinecraftVersionboolean@MonotonicNonNull StringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.api.GeyserApiBase
majorApiVersion, minorApiVersion
-
Field Details
-
JSON_MAPPER
public static final com.fasterxml.jackson.databind.ObjectMapper JSON_MAPPER -
NAME
- See Also:
-
GIT_VERSION
- See Also:
-
VERSION
- See Also:
-
BUILD_NUMBER
- See Also:
-
BRANCH
- See Also:
-
COMMIT
- See Also:
-
REPOSITORY
- See Also:
-
OAUTH_CLIENT_ID
Oauth client ID for Microsoft authentication- See Also:
-
-
Method Details
-
initialize
public void initialize() -
onlineConnections
- Specified by:
onlineConnectionsin interfaceorg.geysermc.geyser.api.GeyserApi- Specified by:
onlineConnectionsin interfaceorg.geysermc.api.GeyserApiBase
-
onlineConnectionsCount
public int onlineConnectionsCount()- Specified by:
onlineConnectionsCountin interfaceorg.geysermc.api.GeyserApiBase
-
usernamePrefix
- Specified by:
usernamePrefixin interfaceorg.geysermc.api.GeyserApiBase
-
connectionByUuid
- Specified by:
connectionByUuidin interfaceorg.geysermc.geyser.api.GeyserApi- Specified by:
connectionByUuidin interfaceorg.geysermc.api.GeyserApiBase
-
connectionByXuid
- Specified by:
connectionByXuidin interfaceorg.geysermc.geyser.api.GeyserApi- Specified by:
connectionByXuidin interfaceorg.geysermc.api.GeyserApiBase
-
isBedrockPlayer
- Specified by:
isBedrockPlayerin interfaceorg.geysermc.api.GeyserApiBase
-
sendForm
- Specified by:
sendFormin interfaceorg.geysermc.api.GeyserApiBase
-
sendForm
public boolean sendForm(@NonNull UUID uuid, @NonNull org.geysermc.cumulus.form.util.FormBuilder<?, ?, ?> formBuilder) - Specified by:
sendFormin interfaceorg.geysermc.api.GeyserApiBase
-
transfer
- Specified by:
transferin interfaceorg.geysermc.api.GeyserApiBase
-
disable
public void disable() -
shutdown
public void shutdown() -
reloadGeyser
public void reloadGeyser() -
isProductionEnvironment
public boolean isProductionEnvironment()Returns false if this Geyser instance is running in an IDE. This only needs to be used in cases where files expected to be in a jarfile are not present.- Returns:
- true if the version number is not 'DEV'.
-
extensionManager
- Specified by:
extensionManagerin interfaceorg.geysermc.geyser.api.GeyserApi
-
commandManager
-
provider
- Specified by:
providerin interfaceorg.geysermc.geyser.api.GeyserApi
-
eventBus
public @NonNull org.geysermc.geyser.api.event.EventBus<org.geysermc.geyser.api.event.EventRegistrar> eventBus()- Specified by:
eventBusin interfaceorg.geysermc.geyser.api.GeyserApi
-
defaultRemoteServer
public @NonNull org.geysermc.geyser.api.network.RemoteServer defaultRemoteServer()- Specified by:
defaultRemoteServerin interfaceorg.geysermc.geyser.api.GeyserApi
-
bedrockListener
public @NonNull org.geysermc.geyser.api.network.BedrockListener bedrockListener()- Specified by:
bedrockListenerin interfaceorg.geysermc.geyser.api.GeyserApi
-
configDirectory
- Specified by:
configDirectoryin interfaceorg.geysermc.geyser.api.GeyserApi
-
packDirectory
- Specified by:
packDirectoryin interfaceorg.geysermc.geyser.api.GeyserApi
-
platformType
public @NonNull org.geysermc.geyser.api.util.PlatformType platformType()- Specified by:
platformTypein interfaceorg.geysermc.geyser.api.GeyserApi
-
supportedJavaVersion
public @NonNull org.geysermc.geyser.api.util.MinecraftVersion supportedJavaVersion()- Specified by:
supportedJavaVersionin interfaceorg.geysermc.geyser.api.GeyserApi
-
supportedBedrockVersions
- Specified by:
supportedBedrockVersionsin interfaceorg.geysermc.geyser.api.GeyserApi
-
consoleCommandSource
public @NonNull org.geysermc.geyser.api.command.CommandSource consoleCommandSource()- Specified by:
consoleCommandSourcein interfaceorg.geysermc.geyser.api.GeyserApi
-
buildNumber
public int buildNumber() -
load
public static GeyserImpl load(org.geysermc.geyser.api.util.PlatformType platformType, GeyserBootstrap bootstrap) -
start
public static void start() -
getLogger
-
getConfig
-
getWorldManager
-
refreshTokenFor
-
saveRefreshToken
-
getSessionManager
-
getCipher
public org.geysermc.floodgate.crypto.FloodgateCipher getCipher() -
getSkinUploader
-
getNewsHandler
-
getErosionUnixListener
-
isShuttingDown
public boolean isShuttingDown() -
getScheduledThread
-
getGeyserServer
-
getPlatformType
public org.geysermc.geyser.api.util.PlatformType getPlatformType() -
getBootstrap
-
getEventBus
public org.geysermc.geyser.api.event.EventBus<org.geysermc.geyser.api.event.EventRegistrar> getEventBus() -
getExtensionManager
-
getMetrics
-
getPendingMicrosoftAuthentication
-
isReloading
public boolean isReloading()Determines if we're currently reloading. Replaces per-bootstrap reload checks -
isEnabled
public boolean isEnabled()Determines if Geyser is currently enabled. This is used to determine ifdisable()should be called duringshutdown(). -
setShouldStartListener
public static void setShouldStartListener(boolean shouldStartListener) This is used in GeyserConnect to stop the bedrock server binding to a port -
setShuttingDown
public void setShuttingDown(boolean shuttingDown) -
getInstance
-
setEnabled
public void setEnabled(boolean isEnabled) Determines if Geyser is currently enabled. This is used to determine ifdisable()should be called duringshutdown().
-