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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionItemEnchantments(Map<EnchantmentType, Integer> enchantments, boolean showInTooltip) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintgetEnchantmentLevel(EnchantmentType enchantment) inthashCode()booleanisEmpty()booleaniterator()static ItemEnchantmentsread(PacketWrapper<?> wrapper) voidsetEnchantmentLevel(EnchantmentType enchantment, int level) voidsetEnchantments(Map<EnchantmentType, Integer> enchantments) voidsetShowInTooltip(boolean showInTooltip) toString()static voidwrite(PacketWrapper<?> wrapper, ItemEnchantments enchantments) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
iteratorin interfaceIterable<Map.Entry<EnchantmentType,Integer>>
-
equals
-
hashCode
public int hashCode() -
toString
-