Interface UserManager<C extends CarbonPlayer>


Manager used to load/obtain and save CarbonPlayers.
Since:
2.0.0
  • Method Details

    • user

      CompletableFuture<C> user(UUID uuid)
      Gets the CarbonPlayer for the provided player UUID, whether they are online or not.

      Note that the returned user object/future is not guaranteed to be the same for subsequent calls.

      Because of this, the return value should not be cached, it should be queried each time it is needed. The implementation handles caching as is appropriate.

      Parameters:
      uuid - the player's id
      Returns:
      the player
      Since:
      3.0.0
    • createParty

      Party createParty(Component name)
      Create a new Party with the specified name.

      Parties with no users will not be saved. Use Party.disband() to discard.

      The returned reference will expire after one minute, store Party.id() rather than the instance and use party(UUID) to retrieve.

      Parameters:
      name - party name
      Returns:
      new party
      Since:
      3.0.0
    • party

      Look up an existing party by its id.

      As parties that have never had a user are not saved, they are not retrievable here.

      The returned reference will expire after one minute, do not cache it. The implementation handles caching as is appropriate.

      Parameters:
      id - party id
      Returns:
      existing party
      Since:
      3.0.0
      See Also: