java.lang.Object
com.github.retrooper.packetevents.protocol.nbt.NBT
com.github.retrooper.packetevents.protocol.nbt.NBTCompound

public class NBTCompound extends NBT
  • Field Details

  • Constructor Details

    • NBTCompound

      public NBTCompound()
  • Method Details

    • getType

      public NBTType<NBTCompound> getType()
      Specified by:
      getType in class NBT
    • isEmpty

      public boolean isEmpty()
    • getTagNames

      public Set<String> getTagNames()
    • getTags

      public Map<String,NBT> getTags()
    • size

      public int size()
    • getTagOrThrow

      public NBT getTagOrThrow(String key)
    • getTagOrNull

      @Nullable public @Nullable NBT getTagOrNull(String key)
    • getTagOfTypeOrThrow

      public <T extends NBT> T getTagOfTypeOrThrow(String key, Class<T> type)
    • getTagOfTypeOrNull

      @Nullable public <T extends NBT> T getTagOfTypeOrNull(String key, Class<T> type)
    • getTagListOfTypeOrThrow

      public <T extends NBT> NBTList<T> getTagListOfTypeOrThrow(String key, Class<T> type)
    • getTagListOfTypeOrNull

      @Nullable public <T extends NBT> @Nullable NBTList<T> getTagListOfTypeOrNull(String key, Class<T> type)
    • getCompoundTagOrThrow

      public NBTCompound getCompoundTagOrThrow(String key)
    • getCompoundTagOrNull

      @Nullable public @Nullable NBTCompound getCompoundTagOrNull(String key)
    • getNumberTagValueOrThrow

      public Number getNumberTagValueOrThrow(String key)
    • getNumberTagValueOrNull

      @Nullable public @Nullable Number getNumberTagValueOrNull(String key)
    • getNumberTagValueOrDefault

      @Contract("_, !null -> !null") @Nullable public @Nullable Number getNumberTagValueOrDefault(String key, @Nullable @Nullable Number number)
    • getNumberTagOrThrow

      public NBTNumber getNumberTagOrThrow(String key)
    • getNumberTagOrNull

      @Nullable public @Nullable NBTNumber getNumberTagOrNull(String key)
    • getStringTagOrThrow

      public NBTString getStringTagOrThrow(String key)
    • getStringTagOrNull

      @Nullable public @Nullable NBTString getStringTagOrNull(String key)
    • getCompoundListTagOrThrow

      public NBTList<NBTCompound> getCompoundListTagOrThrow(String key)
    • getCompoundListTagOrNull

      @Nullable public @Nullable NBTList<NBTCompound> getCompoundListTagOrNull(String key)
    • getNumberTagListTagOrThrow

      public NBTList<NBTNumber> getNumberTagListTagOrThrow(String key)
    • getNumberListTagOrNull

      @Nullable public @Nullable NBTList<NBTNumber> getNumberListTagOrNull(String key)
    • getStringListTagOrThrow

      public NBTList<NBTString> getStringListTagOrThrow(String key)
    • getStringListTagOrNull

      @Nullable public @Nullable NBTList<NBTString> getStringListTagOrNull(String key)
    • getStringTagValueOrThrow

      public String getStringTagValueOrThrow(String key)
    • getStringTagValueOrNull

      @Nullable public @Nullable String getStringTagValueOrNull(String key)
    • getStringTagValueOrDefault

      public String getStringTagValueOrDefault(String key, String defaultValue)
    • removeTag

      public NBT removeTag(String key)
    • removeTagAndReturnIfType

      public <T extends NBT> T removeTagAndReturnIfType(String key, Class<T> type)
    • removeTagAndReturnIfListType

      public <T extends NBT> NBTList<T> removeTagAndReturnIfListType(String key, Class<T> type)
    • setTag

      public void setTag(String key, NBT tag)
    • copy

      public NBTCompound copy()
      Specified by:
      copy in class NBT
    • getBoolean

      public boolean getBoolean(String string)
    • getBooleanOr

      public boolean getBooleanOr(String string, boolean defaultValue)
    • getOr

      @Contract("_, _, !null, _ -> !null") @Nullable public <T> T getOr(String key, NbtDecoder<T> decoder, @Nullable T def, PacketWrapper<?> wrapper)
    • getOrNull

      @Nullable public <T> T getOrNull(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper)
    • getOrThrow

      public <T> T getOrThrow(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper)
    • getListOr

      @Contract("_, _, !null, _ -> !null") @Nullable public <T> @Nullable List<T> getListOr(String key, NbtDecoder<T> decoder, @Nullable @Nullable List<T> def, PacketWrapper<?> wrapper)
    • getListOrNull

      @Nullable public <T> @Nullable List<T> getListOrNull(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper)
    • getListOrEmpty

      public <T> List<T> getListOrEmpty(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper)
    • getListOrThrow

      public <T> List<T> getListOrThrow(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper)
    • set

      public <T> void set(String key, T value, NbtEncoder<T> encoder, PacketWrapper<?> wrapper)
    • setList

      public <T> void setList(String key, List<T> value, NbtEncoder<T> encoder, PacketWrapper<?> wrapper)
    • setCompactList

      public <T> void setCompactList(String key, List<T> value, NbtEncoder<T> encoder, PacketWrapper<?> wrapper)
    • equals

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

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

      public String toString()
      Overrides:
      toString in class NBT