Function getPlayerNameFromUUID

  • Gets a player's name from their UUID.

    Only works if the player's name was stored in an add-on's dynamic properties with their ID linked to it, and it only works for a hardcoded list of add-ons, if you have your own add-on that you would like this to be able to read the player's names from, contact 8Crafter, or make a pull request.

    Parameters

    • db: LevelDB

      The LevelDB. Should match the type of the LevelDB class from the @8crafter/leveldb-zlib package. It does not have to be the one from that package, as long as the types match.

    • uuid: string | bigint

      The UUID of the play to get the name of.

    Returns Promise<null | string>

    The name of the player, or null if the player's name cannot be found or the world has no dynamic properties.

    If there was an error reading the DynamicProperties from the DB.