getPlayerByInstance

abstract fun getPlayerByInstance(instance: Any): McProxyPlayer

Gets a proxy player by their server-specific instance.

The instance parameter represents the server-specific player instance:

  • For Velocity: com.velocitypowered.api.proxy.Player

  • For BungeeCord: net.md_5.bungee.api.connection.ProxiedPlayer

Return

A McProxyPlayer instance corresponding to the provided server instance.

Parameters

instance

The server-specific player instance.