Package com.marcusslover.plus.lib.mojang
Class MojangProfileAPI.MojangProfile
java.lang.Object
com.marcusslover.plus.lib.mojang.MojangProfileAPI.MojangProfile
- Enclosing class:
MojangProfileAPI
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.profile.PlayerProfileDeprecated.@NotNull com.destroystokyo.paper.profile.PlayerProfileConverts the Mojang profile to a Paper profile.@NotNull CompletableFuture<@Nullable MojangProfileAPI.MojangProfile> update()Attempts to update the whole Mojang profile.
-
Constructor Details
-
MojangProfile
public MojangProfile()
-
-
Method Details
-
update
Attempts to update the whole Mojang profile. This function is asynchronous and will return aCompletableFuturethat 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.UseasPaperProfile()instead.Converts the Mojang profile to a Bukkit profile. (old API)- Returns:
- The Bukkit profile.
-
asPaperProfile()instead.