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
Modifier and TypeClassDescriptionstatic class
Contains 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, unbreakable
Fields inherited from interface xyz.xenondevs.invui.item.ItemProvider
EMPTY
-
Constructor Summary
ConstructorDescriptionSkullBuilder
(@NotNull String username) Create aSkullBuilder
with thePlayer's
username.SkullBuilder
(@NotNull UUID uuid) SkullBuilder
(@NotNull SkullBuilder.HeadTexture headTexture) Create aSkullBuilder
with aSkullBuilder.HeadTexture
. -
Method Summary
Modifier and TypeMethodDescription@NotNull SkullBuilder
clone()
Clones this builder.@NotNull org.bukkit.inventory.ItemStack
Builds theItemStack
@NotNull SkullBuilder
setMaterial
(@NotNull org.bukkit.Material material) Sets theMaterial
of 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, setUnbreakable
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xyz.xenondevs.invui.item.ItemProvider
get
-
Constructor Details
-
SkullBuilder
public SkullBuilder(@NotNull @NotNull UUID uuid) throws MojangApiUtils.MojangApiException, IOException - Parameters:
uuid
- TheUUID
of the skull owner.- Throws:
MojangApiUtils.MojangApiException
- If the Mojang API returns an error.IOException
- If an I/O error occurs.
-
SkullBuilder
public SkullBuilder(@NotNull @NotNull String username) throws MojangApiUtils.MojangApiException, IOException Create aSkullBuilder
with thePlayer's
username.- 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 aSkullBuilder
with aSkullBuilder.HeadTexture
.- Parameters:
headTexture
- TheSkullBuilder.HeadTexture
to 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:AbstractItemBuilder
Builds theItemStack
- Specified by:
get
in interfaceItemProvider
- Overrides:
get
in 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:AbstractItemBuilder
Sets theMaterial
of this builder.- Overrides:
setMaterial
in classAbstractItemBuilder<SkullBuilder>
- Parameters:
material
- TheMaterial
- Returns:
- The builder instance
-
clone
Description copied from class:AbstractItemBuilder
Clones this builder.- Overrides:
clone
in classAbstractItemBuilder<SkullBuilder>
- Returns:
- The cloned builder
-