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 @NonNull GeyserApiapi()Gets the currentGeyserApiBaseinstance.@NonNull BedrockListenerGets theBedrockListenerused for listening for Minecraft: Bedrock Edition client connections.@NonNull PathGets thePathto the Geyser config directory.@Nullable GeyserConnectionconnectionByUuid(@NonNull UUID uuid) @Nullable GeyserConnectionconnectionByXuid(@NonNull String xuid) @NonNull CommandSourceGets theCommandSourcefor the console.@NonNull RemoteServerGets the defaultRemoteServerconfigured within the config file that is used by default.@NonNull EventBus<EventRegistrar> eventBus()Gets theEventBusfor handling Geyser events.@NonNull ExtensionManagerGets theExtensionManager.default org.geysermc.api.util.ApiVersionReturns theApiVersionrepresenting the current Geyser api version.@NonNull List<? extends GeyserConnection> @NonNull PathGets thePathto the Geyser packs directory.@NonNull PlatformTypeGetsPlatformTypethe extension is running on<R extends T,T>
@NonNull RProvides an implementation for the specified API type.@NonNull List<MinecraftVersion> Gets a list of Bedrock Minecraft versions that are supported.@NonNull MinecraftVersionGets 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
@NonNull List<? extends GeyserConnection> onlineConnections()- Specified by:
onlineConnectionsin interfaceorg.geysermc.api.GeyserApiBase
-
extensionManager
@NonNull 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
@NonNull EventBus<EventRegistrar> eventBus()Gets theEventBusfor handling Geyser events.- Returns:
- the event bus
-
defaultRemoteServer
@NonNull RemoteServer defaultRemoteServer()Gets the defaultRemoteServerconfigured within the config file that is used by default.- Returns:
- the default remote server used within Geyser
-
bedrockListener
@NonNull BedrockListener bedrockListener()Gets theBedrockListenerused for listening for Minecraft: Bedrock Edition client connections.- Returns:
- the listener used for Bedrock client connectins
-
configDirectory
@NonNull Path configDirectory()Gets thePathto the Geyser config directory.- Returns:
- the path to the Geyser config directory
-
packDirectory
@NonNull Path packDirectory()Gets thePathto the Geyser packs directory.- Returns:
- the path to the Geyser packs directory
-
platformType
@NonNull PlatformType platformType()GetsPlatformTypethe extension is running on- Returns:
- type of platform
-
supportedJavaVersion
@NonNull MinecraftVersion supportedJavaVersion()Gets the version of Java Minecraft that is supported.- Returns:
- the supported version of Java Minecraft
-
supportedBedrockVersions
@NonNull List<MinecraftVersion> supportedBedrockVersions()Gets a list of Bedrock Minecraft versions that are supported.- Returns:
- the list of supported Bedrock Minecraft versions
-
consoleCommandSource
@NonNull 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
-