Package org.geysermc.geyser.api
Interface GeyserApi
- All Superinterfaces:
org.geysermc.api.GeyserApiBase
public interface GeyserApi
extends org.geysermc.api.GeyserApiBase
Represents the API used in Geyser.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull GeyserApi
api()
Gets the currentGeyserApiBase
instance.@NonNull BedrockListener
Gets theBedrockListener
used for listening for Minecraft: Bedrock Edition client connections.@NonNull Path
Gets thePath
to the Geyser config directory.@Nullable GeyserConnection
connectionByUuid(@NonNull UUID uuid)
@Nullable GeyserConnection
connectionByXuid(@NonNull String xuid)
@NonNull RemoteServer
Gets the defaultRemoteServer
configured within the config file that is used by default.@NonNull EventBus<EventRegistrar>
eventBus()
Gets theEventBus
for handling Geyser events.@NonNull ExtensionManager
Gets theExtensionManager
.@NonNull List<? extends GeyserConnection>
@NonNull Path
Gets thePath
to the Geyser packs directory.@NonNull PlatformType
GetsPlatformType
the extension is running on<R extends T, T>
@NonNull RProvides an implementation for the specified API type.Methods inherited from interface org.geysermc.api.GeyserApiBase
isBedrockPlayer, majorApiVersion, minorApiVersion, onlineConnectionsCount, sendForm, sendForm, transfer, usernamePrefix
-
Method Details
-
connectionByUuid
- Specified by:
connectionByUuid
in interfaceorg.geysermc.api.GeyserApiBase
-
connectionByXuid
- Specified by:
connectionByXuid
in interfaceorg.geysermc.api.GeyserApiBase
-
onlineConnections
@NonNull List<? extends GeyserConnection> onlineConnections()- Specified by:
onlineConnections
in 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
-
eventBus
@NonNull EventBus<EventRegistrar> eventBus()Gets theEventBus
for handling Geyser events.- Returns:
- the event bus
-
defaultRemoteServer
@NonNull RemoteServer defaultRemoteServer()Gets the defaultRemoteServer
configured within the config file that is used by default.- Returns:
- the default remote server used within Geyser
-
bedrockListener
@NonNull BedrockListener bedrockListener()Gets theBedrockListener
used for listening for Minecraft: Bedrock Edition client connections.- Returns:
- the listener used for Bedrock client connectins
-
configDirectory
@NonNull Path configDirectory()Gets thePath
to the Geyser config directory.- Returns:
- the path to the Geyser config directory
-
packDirectory
@NonNull Path packDirectory()Gets thePath
to the Geyser packs directory.- Returns:
- the path to the Geyser packs directory
-
platformType
@NonNull PlatformType platformType()GetsPlatformType
the extension is running on- Returns:
- type of platform
-
api
Gets the currentGeyserApiBase
instance.- Returns:
- the current geyser api instance
-