Package org.geysermc.geyser.api
Interface GeyserApi
- All Superinterfaces:
org.geysermc.api.GeyserApiBase
@NonExtendable
public interface GeyserApi
extends org.geysermc.api.GeyserApiBase
Represents the API used in Geyser.
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeyserApiapi()Gets the currentGeyserApiBaseinstance.Gets theBedrockListenerused for listening for Minecraft: Bedrock Edition client connections.Gets thePathto the Geyser config directory.@Nullable GeyserConnectionconnectionByUuid(UUID uuid) @Nullable GeyserConnectionconnectionByXuid(String xuid) Gets theCommandSourcefor the console.Gets the defaultRemoteServerconfigured within the config file that is used by default.eventBus()Gets theEventBusfor handling Geyser events.Gets theExtensionManager.default org.geysermc.api.util.ApiVersionReturns theApiVersionrepresenting the current Geyser api version.List<? extends GeyserConnection> Gets thePathto the Geyser packs directory.GetsPlatformTypethe extension is running on<R extends T,T>
RProvides an implementation for the specified API type.Gets a list of Bedrock Minecraft versions that are supported.Gets the version of Java Minecraft that is supported.Methods inherited from interface org.geysermc.api.GeyserApiBase
baseApiVersion, isBedrockPlayer, majorApiVersion, minorApiVersion, onlineConnectionsCount, sendForm, sendForm, transfer, usernamePrefix
-
Method Details
-
connectionByUuid
- Specified by:
connectionByUuidin interfaceorg.geysermc.api.GeyserApiBase
-
connectionByXuid
- Specified by:
connectionByXuidin interfaceorg.geysermc.api.GeyserApiBase
-
onlineConnections
List<? extends GeyserConnection> onlineConnections()- Specified by:
onlineConnectionsin interfaceorg.geysermc.api.GeyserApiBase
-
extensionManager
ExtensionManager extensionManager()Gets theExtensionManager.- Returns:
- the extension manager
-
provider
Provides an implementation for the specified API type.- Type Parameters:
R- the implementation typeT- the API type- Parameters:
apiClass- the builder class- Returns:
- the builder instance
- Throws:
IllegalArgumentException- if there is no provider for the specified API class
-
eventBus
EventBus<EventRegistrar> eventBus()Gets theEventBusfor handling Geyser events.- Returns:
- the event bus
-
defaultRemoteServer
RemoteServer defaultRemoteServer()Gets the defaultRemoteServerconfigured within the config file that is used by default.- Returns:
- the default remote server used within Geyser
-
bedrockListener
BedrockListener bedrockListener()Gets theBedrockListenerused for listening for Minecraft: Bedrock Edition client connections.- Returns:
- the listener used for Bedrock client connectins
-
configDirectory
Path configDirectory()Gets thePathto the Geyser config directory.- Returns:
- the path to the Geyser config directory
-
packDirectory
Path packDirectory()Gets thePathto the Geyser packs directory.- Returns:
- the path to the Geyser packs directory
-
platformType
PlatformType platformType()GetsPlatformTypethe extension is running on- Returns:
- type of platform
-
supportedJavaVersion
MinecraftVersion supportedJavaVersion()Gets the version of Java Minecraft that is supported.- Returns:
- the supported version of Java Minecraft
-
supportedBedrockVersions
List<MinecraftVersion> supportedBedrockVersions()Gets a list of Bedrock Minecraft versions that are supported.- Returns:
- the list of supported Bedrock Minecraft versions
-
consoleCommandSource
CommandSource consoleCommandSource()Gets theCommandSourcefor the console.- Returns:
- the console command source
-
api
Gets the currentGeyserApiBaseinstance.- Returns:
- the current geyser api instance
-
geyserApiVersion
default org.geysermc.api.util.ApiVersion geyserApiVersion()Returns theApiVersionrepresenting the current Geyser api version. See the Geyser version outline)- Returns:
- the current geyser api version
-