Package org.geysermc.geyser
Class GeyserImpl
java.lang.Object
org.geysermc.geyser.GeyserImpl
- All Implemented Interfaces:
GeyserApiBase
,GeyserApi
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable GeyserSession
connectionByName(@NonNull String name)
Gets the session from the given name, if applicable.@Nullable GeyserSession
connectionByUuid(@NonNull UUID uuid)
Gets the session from the given UUID, if applicable.@Nullable GeyserSession
connectionByXuid(@NonNull String xuid)
Gets the session from the given XUID, if applicable.com.nukkitx.protocol.bedrock.BedrockServer
static GeyserImpl
boolean
@NonNull List<GeyserSession>
Gets all the online sessions.boolean
Returns false if this Geyser instance is running in an IDE.void
registerPluginChannel(String channel)
Register a Plugin Channel This will maintain what channels are registered and ensure new connections and existing connections are registered correctlyvoid
reload()
Reloads the current Geyser instance.static void
setShouldStartListener(boolean shouldStartListener)
This is used in GeyserConnect to stop the bedrock server binding to a portvoid
shutdown()
Shuts down the current Geyser instance.static GeyserImpl
start(PlatformType platformType, GeyserBootstrap bootstrap)
void
unregisterPluginChannel(String channel)
Unregister a Plugin Channel This will maintain what channels are registered and ensure new connections and existing connections are registered correctlyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
- Constant Field Values
-
GIT_VERSION
- See Also:
- Constant Field Values
-
VERSION
- See Also:
- Constant Field Values
-
OAUTH_CLIENT_ID
Oauth client ID for Microsoft authentication- See Also:
- Constant Field Values
-
-
Method Details
-
connectionByName
Description copied from interface:GeyserApi
Gets the session from the given name, if applicable.- Specified by:
connectionByName
in interfaceGeyserApi
- Specified by:
connectionByName
in interfaceGeyserApiBase
- Parameters:
name
- the uuid of the session- Returns:
- the session from the given name, if applicable
-
onlineConnections
Description copied from interface:GeyserApi
Gets all the online sessions.- Specified by:
onlineConnections
in interfaceGeyserApi
- Specified by:
onlineConnections
in interfaceGeyserApiBase
- Returns:
- all the online sessions
-
connectionByUuid
Description copied from interface:GeyserApi
Gets the session from the given UUID, if applicable. The player must be logged in to the Java server for this to return a non-null value.- Specified by:
connectionByUuid
in interfaceGeyserApi
- Specified by:
connectionByUuid
in interfaceGeyserApiBase
- Parameters:
uuid
- the UUID of the session- Returns:
- the session from the given UUID, if applicable
-
connectionByXuid
Description copied from interface:GeyserApi
Gets the session from the given XUID, if applicable.- Specified by:
connectionByXuid
in interfaceGeyserApi
- Specified by:
connectionByXuid
in interfaceGeyserApiBase
- Parameters:
xuid
- the XUID of the session- Returns:
- the session from the given UUID, if applicable
-
shutdown
public void shutdown()Description copied from interface:GeyserApi
Shuts down the current Geyser instance. -
reload
public void reload()Description copied from interface:GeyserApi
Reloads the current Geyser instance. -
productionEnvironment
public boolean productionEnvironment()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.- Specified by:
productionEnvironment
in interfaceGeyserApi
- Returns:
- true if the version number is not 'DEV'.
-
start
-
getLogger
-
getConfig
-
getCommandManager
-
getWorldManager
-
registerPluginChannel
Register a Plugin Channel This will maintain what channels are registered and ensure new connections and existing connections are registered correctly- Parameters:
channel
- Channel to register- Throws:
IllegalArgumentException
-
unregisterPluginChannel
Unregister a Plugin Channel This will maintain what channels are registered and ensure new connections and existing connections are registered correctly- Parameters:
channel
- Channel to unregister
-
getInstance
-
getSessionManager
-
getCipher
-
getSkinUploader
-
getNewsHandler
-
isShuttingDown
public boolean isShuttingDown() -
getScheduledThread
-
getBedrockServer
public com.nukkitx.protocol.bedrock.BedrockServer getBedrockServer() -
getPlatformType
-
getBootstrap
-
getEventManager
-
getExtensionManager
-
getRegisteredPluginChannels
-
getMetrics
-
setShouldStartListener
public static void setShouldStartListener(boolean shouldStartListener)This is used in GeyserConnect to stop the bedrock server binding to a port
-