Interface Profileable
- All Known Implementing Classes:
Profileable.AbstractProfileable,Profileable.GameProfileProfileable,Profileable.OfflinePlayerProfileable,Profileable.PlayerProfileable,Profileable.StringProfileable,Profileable.UsernameProfileable,Profileable.UUIDProfileable,ProfileContainer,ProfileContainer.BlockProfileContainer,ProfileContainer.BlockStateProfileContainer,ProfileContainer.ItemMetaProfileContainer,ProfileContainer.ItemStackProfileContainer,ProfileInstruction
public interface Profileable
Represents any object that has a
GameProfile or one can be created with it.
These objects are cached.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic ProfileableSets the skull texture based on a string.com.mojang.authlib.GameProfileThe final texture that will be supplied toprofileContainerto be applied.default @Nullable Stringstatic Profileableof(ProfileInputType type, String input) Sets the skull texture based on a string with a known type.static Profileableof(com.mojang.authlib.GameProfile profile) Sets the skull texture based on the specified profile.static ProfileableSets the skull texture based on the specified player UUID (whether it's an offline or online UUID).static Profileableof(org.bukkit.entity.Player player) Sets the skull texture based on the specified player.static Profileableof(org.bukkit.OfflinePlayer offlinePlayer) Sets the skull texture based on the specified offline player.static <C extends Collection<Profileable>>
CompletableFuture<C>prepare(C profileables) static <C extends Collection<Profileable>>
CompletableFuture<C>prepare(C profileables, @Nullable ProfileRequestConfiguration config, @Nullable com.google.common.base.Function<Throwable, Boolean> errorHandler) static ProfileableSets the skull texture based on the specified player UUID (whether it's an offline or online UUID).
-
Method Details
-
getProfile
com.mojang.authlib.GameProfile getProfile()The final texture that will be supplied toprofileContainerto be applied. -
getProfileValue
-
prepare
@Nonnull static <C extends Collection<Profileable>> CompletableFuture<C> prepare(@Nonnull C profileables) -
prepare
@Nonnull @Experimental static <C extends Collection<Profileable>> CompletableFuture<C> prepare(@Nonnull C profileables, @Nullable @Nullable ProfileRequestConfiguration config, @Nullable @Nullable com.google.common.base.Function<Throwable, Boolean> errorHandler) -
username
Sets the skull texture based on the specified player UUID (whether it's an offline or online UUID). -
of
Sets the skull texture based on the specified player UUID (whether it's an offline or online UUID). -
of
Sets the skull texture based on the specified profile. If the profile already has textures, it will be used directly. Otherwise, a new profile will be fetched based on the UUID or username depending on the server's online mode.- Parameters:
profile- The profile to be used in the profile setting operation.
-
of
Sets the skull texture based on the specified player.- Parameters:
player- The player to generate theGameProfile.
-
of
Sets the skull texture based on the specified offline player. The profile lookup will depend on whether the server is running in online mode.- Parameters:
offlinePlayer- The offline player to generate theGameProfile.
-
detect
Sets the skull texture based on a string. The input type is resolved based on the value provided.Valid Types
Username: A player username. (e.g. Notch)
UUID: A player UUID. Offline or online mode UUID. (e.g. 069a79f4-44e9-4726-a5be-fca90e38aaf5)
Base64: The Base64 encoded value of textures JSON. (e.g. eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2NmNjc2N2RkMzQ3MzdlOTliZDU0YjY5NWVmMDY4M2M2YzZjZTZhNTRmNjZhZDk3Mjk5MmJkMGU0OGU0NTc5YiJ9fX0=)
Minecraft Textures URL: CheckProfileInputType.TEXTURE_URL.
Minecraft Textures Hash: Same as the URL, but only including the hash part, excluding the base URL. (e.g. e5461a215b325fbdf892db67b7bfb60ad2bf1580dc968a15dfb304ccd5e74db)- Parameters:
input- The input value used to retrieve theGameProfile. For more information checkProfileInputType
-
of
Sets the skull texture based on a string with a known type.- Parameters:
type- The type of the input value.input- The input value to generate theGameProfile.
-