Class ItemEnchantments
java.lang.Object
com.github.retrooper.packetevents.protocol.component.builtin.item.ItemEnchantments
- All Implemented Interfaces:
Iterable<Map.Entry<EnchantmentType,
Integer>>
public class ItemEnchantments
extends Object
implements Iterable<Map.Entry<EnchantmentType,Integer>>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionItemEnchantments
(Map<EnchantmentType, Integer> enchantments, boolean showInTooltip) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
int
getEnchantmentLevel
(EnchantmentType enchantment) int
hashCode()
boolean
isEmpty()
boolean
iterator()
static ItemEnchantments
read
(PacketWrapper<?> wrapper) void
setEnchantmentLevel
(EnchantmentType enchantment, int level) void
setEnchantments
(Map<EnchantmentType, Integer> enchantments) void
setShowInTooltip
(boolean showInTooltip) toString()
static void
write
(PacketWrapper<?> wrapper, ItemEnchantments enchantments) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ItemEnchantments
-
-
Method Details
-
read
-
write
-
getEnchantmentLevel
-
setEnchantmentLevel
-
isEmpty
public boolean isEmpty() -
getEnchantmentCount
public int getEnchantmentCount() -
getEnchantments
-
setEnchantments
-
isShowInTooltip
public boolean isShowInTooltip() -
setShowInTooltip
public void setShowInTooltip(boolean showInTooltip) -
iterator
- Specified by:
iterator
in interfaceIterable<Map.Entry<EnchantmentType,
Integer>>
-
equals
-
hashCode
public int hashCode() -
toString
-