Package de.clickism.clickgui.menu
Interface Icon
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents the icon of a button.
-
Method Summary
Modifier and TypeMethodDescriptiondefault IconAdds the enchantment glint to this icon.default IconaddLoreLine(String line) Adds a line to the lore of this icon.default IconapplyToMeta(Consumer<org.bukkit.inventory.meta.ItemMeta> consumer) Applies the consumer to the meta of this icon.static Iconempty()Creates an empty icon.org.bukkit.inventory.ItemStackget()Gets the item stack of this icon.default IconHides all attributes of this icon.default IconHides the attributes of this icon.default IconHides potion effects of this icon.static IconCreates a dynamic icon from the given icon supplier.static Iconof(org.bukkit.inventory.ItemStack item) Creates an icon from the given item stack.static Iconof(org.bukkit.Material material) Creates an icon from the given material.default IconRuns the consumer if the condition is true.default IconSets the lore of this icon.default IconSets the lore of this icon.default IconsetMaterial(org.bukkit.Material material) Sets the material of this icon.default IconSets the name of this icon.
-
Method Details
-
get
org.bukkit.inventory.ItemStack get()Gets the item stack of this icon.- Returns:
- the item stack
-
setName
Sets the name of this icon.- Parameters:
name- the name- Returns:
- this icon
-
setMaterial
Sets the material of this icon.- Parameters:
material- the material- Returns:
- this icon
-
hideAttributes
Hides the attributes of this icon.- Returns:
- this icon
-
hidePotionEffects
Hides potion effects of this icon.- Returns:
- this icon
-
hideAllAttributes
Hides all attributes of this icon.- Returns:
- this icon
-
addEnchantmentGlint
Adds the enchantment glint to this icon.- Returns:
- this icon
-
setLore
Sets the lore of this icon.- Parameters:
lore- the lore- Returns:
- this icon
-
setLore
Sets the lore of this icon.- Parameters:
lore- the lore- Returns:
- this icon
-
addLoreLine
Adds a line to the lore of this icon.- Parameters:
line- the line- Returns:
- this icon
-
applyToMeta
Applies the consumer to the meta of this icon.- Parameters:
consumer- the consumer- Returns:
- this icon
-
runIf
Runs the consumer if the condition is true.- Parameters:
condition- the conditionconsumer- the consumer- Returns:
- this icon
-
empty
Creates an empty icon.- Returns:
- the icon
-
of
Creates an icon from the given item stack.- Parameters:
item- the item stack- Returns:
- the icon
-
of
Creates an icon from the given material.- Parameters:
material- the material- Returns:
- the icon
-
of
Creates a dynamic icon from the given icon supplier.- Parameters:
iconSupplier- the icon supplier- Returns:
- the icon
-