Class NBTList<T extends NBT>

java.lang.Object
com.github.retrooper.packetevents.protocol.nbt.NBT
com.github.retrooper.packetevents.protocol.nbt.NBTList<T>

public class NBTList<T extends NBT> extends NBT
  • Field Details

    • type

      protected final NBTType<T extends NBT> type
    • tags

      protected final List<T extends NBT> tags
  • Constructor Details

    • NBTList

      public NBTList(NBTType<T> type)
    • NBTList

      public NBTList(NBTType<T> type, int size)
    • NBTList

      public NBTList(NBTType<T> type, List<T> tags)
  • Method Details

    • createCompoundList

      public static NBTList<NBTCompound> createCompoundList()
    • createStringList

      public static NBTList<NBTString> createStringList()
    • getType

      public NBTType<NBTList> getType()
      Specified by:
      getType in class NBT
    • getTagsType

      public NBTType<T> getTagsType()
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • getTags

      public List<T> getTags()
    • getTag

      public T getTag(int index)
    • setTag

      public void setTag(int index, T tag)
    • addTag

      public void addTag(int index, T tag)
    • addTag

      public void addTag(T tag)
    • addTagUnsafe

      public void addTagUnsafe(int index, NBT nbt)
    • addTagUnsafe

      public void addTagUnsafe(NBT nbt)
    • removeTag

      public void removeTag(int index)
    • validateAddTag

      protected void validateAddTag(T tag)
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in class NBT
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class NBT
    • copy

      public NBTList<T> copy()
      Specified by:
      copy in class NBT
    • toString

      public String toString()
      Overrides:
      toString in class NBT