getInstance

abstract fun <T> getInstance(): T

Gets the server's implementation instance for this source.

The return type may vary depending on the server platform:

  • For servers (Paper/Fabric/Forge/NeoForge): net.minecraft.commands.CommandSourceStack

  • For Minestom: net.minestom.server.command.CommandSender

  • For BungeeCord: net.md_5.bungee.api.CommandSender

  • For Velocity: com.velocitypowered.api.command.CommandSource

Return

The server's implementation object associated with this source.

Parameters

T

The expected type of the server's implementation instance.