Interface PlayerLocator

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PlayerLocator
Service for resolving which server a player is currently connected to within the bridge network.

A PlayerLocator is available only on the Velocity proxy. Obtain an instance via CommandBridgeAPI.playerLocator(). On backend servers, that method returns Optional.empty().

To resolve a player's current server:


 locator.locate(playerUUID).ifPresent(target ->
         Log.info("Player is on server: {}", target.id()));
 
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    locate(UUID player)
    Resolves the server a player is currently connected to.