PlatformAdapter

Abstraction over platform-specific command source handling.

Each platform (Paper, Velocity, …) provides an implementation that bridges between Brigadier's raw source type S and the platform's sender/audience type Sender. This allows command definitions to be written once and used across platforms.

Parameters

S

the Brigadier command source type (e.g. CommandSourceStack, CommandSource)

Sender

the platform's sender type (e.g. CommandSender, CommandSource)

Functions

Link copied to clipboard
abstract fun hasPermission(source: S, permission: String): Boolean

Checks whether the source has the given permission.

Link copied to clipboard
abstract fun sender(source: S): Sender

Extracts the platform-specific sender from the raw Brigadier source.