Class MojangProfileAPI.MojangProfile

java.lang.Object
com.marcusslover.plus.lib.mojang.MojangProfileAPI.MojangProfile
Enclosing class:
MojangProfileAPI

public static class MojangProfileAPI.MojangProfile extends Object
An object that keeps information about a player's name and UUID. Cached profiles are used to prevent unnecessary requests to the Mojang API.
  • Constructor Details

    • MojangProfile

      public MojangProfile()
  • Method Details

    • update

      @NotNull public @NotNull CompletableFuture<@Nullable MojangProfileAPI.MojangProfile> update()
      Attempts to update the whole Mojang profile. This function is asynchronous and will return a CompletableFuture that will be completed when the profile is updated. All the results are cached.
      Returns:
      The updated Mojang profile.
    • asPaperProfile

      @NotNull public @NotNull com.destroystokyo.paper.profile.PlayerProfile asPaperProfile()
      Converts the Mojang profile to a Paper profile.
      Returns:
      The Paper profile.
    • asBukkitProfile

      @Deprecated @NotNull public org.bukkit.profile.PlayerProfile asBukkitProfile()
      Deprecated.
      Use asPaperProfile() instead.
      Converts the Mojang profile to a Bukkit profile. (old API)
      Returns:
      The Bukkit profile.