Package xyz.xenondevs.invui.item.builder
Class SkullBuilder
java.lang.Object
xyz.xenondevs.invui.item.builder.AbstractItemBuilder<SkullBuilder>
xyz.xenondevs.invui.item.builder.SkullBuilder
- All Implemented Interfaces:
Cloneable,Supplier<@NotNull org.bukkit.inventory.ItemStack>,ItemProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContains the texture value for a player head. -
Field Summary
Fields inherited from class xyz.xenondevs.invui.item.builder.AbstractItemBuilder
amount, base, customModelData, damage, displayName, enchantments, itemFlags, lore, material, modifiers, unbreakableFields inherited from interface xyz.xenondevs.invui.item.ItemProvider
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionSkullBuilder(@NotNull String username) Deprecated.SkullBuilder(@NotNull UUID uuid) Deprecated.Prefer usingSkullBuilder(HeadTexture)with a hardcoded texture value instead of querying the Mojang API.SkullBuilder(@NotNull SkullBuilder.HeadTexture headTexture) Create aSkullBuilderwith aSkullBuilder.HeadTexture. -
Method Summary
Modifier and TypeMethodDescription@NotNull SkullBuilderclone()Clones this builder.@NotNull org.bukkit.inventory.ItemStackBuilds theItemStack@NotNull SkullBuildersetMaterial(@NotNull org.bukkit.Material material) Sets theMaterialof this builder.Methods inherited from class xyz.xenondevs.invui.item.builder.AbstractItemBuilder
addAllItemFlags, addEnchantment, addItemFlags, addLegacyLoreLines, addLoreLines, addLoreLines, addLoreLines, addLoreLines, addModifier, clearEnchantments, clearItemFlags, clearLore, clearModifiers, getAmount, getBase, getCustomModelData, getDamage, getDisplayName, getEnchantments, getItemFlags, getLore, getMaterial, getModifiers, isUnbreakable, removeEnchantment, removeItemFlags, removeLoreLine, setAmount, setCustomModelData, setDamage, setDisplayName, setDisplayName, setDisplayName, setEnchantments, setItemFlags, setLegacyLore, setLore, setUnbreakableMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface xyz.xenondevs.invui.item.ItemProvider
get
-
Constructor Details
-
SkullBuilder
@Deprecated public SkullBuilder(@NotNull @NotNull UUID uuid) throws MojangApiUtils.MojangApiException, IOException Deprecated.Prefer usingSkullBuilder(HeadTexture)with a hardcoded texture value instead of querying the Mojang API.- Parameters:
uuid- TheUUIDof the skull owner.- Throws:
MojangApiUtils.MojangApiException- If the Mojang API returns an error.IOException- If an I/O error occurs.
-
SkullBuilder
@Deprecated public SkullBuilder(@NotNull @NotNull String username) throws MojangApiUtils.MojangApiException, IOException Deprecated.Prefer usingSkullBuilder(HeadTexture)with a hardcoded texture value instead of querying the Mojang API.Create aSkullBuilderwith thePlayer'susername.- Parameters:
username- The username of the skull owner.- Throws:
MojangApiUtils.MojangApiException- If the Mojang API returns an error.IOException- If an I/O error occurs.
-
SkullBuilder
Create aSkullBuilderwith aSkullBuilder.HeadTexture.- Parameters:
headTexture- TheSkullBuilder.HeadTextureto be applied to the skull.
-
-
Method Details
-
get
@Contract(value="_ -> new", pure=true) @NotNull public @NotNull org.bukkit.inventory.ItemStack get(@Nullable @Nullable String lang) Description copied from class:AbstractItemBuilderBuilds theItemStack- Specified by:
getin interfaceItemProvider- Overrides:
getin classAbstractItemBuilder<SkullBuilder>- Parameters:
lang- The language to translate the item in.- Returns:
- The
ItemStack
-
setMaterial
@Contract("_ -> this") @NotNull public @NotNull SkullBuilder setMaterial(@NotNull @NotNull org.bukkit.Material material) Description copied from class:AbstractItemBuilderSets theMaterialof this builder.- Overrides:
setMaterialin classAbstractItemBuilder<SkullBuilder>- Parameters:
material- TheMaterial- Returns:
- The builder instance
-
clone
Description copied from class:AbstractItemBuilderClones this builder.- Overrides:
clonein classAbstractItemBuilder<SkullBuilder>- Returns:
- The cloned builder
-
SkullBuilder(HeadTexture)with a hardcoded texture value instead of querying the Mojang API.