Interface NbtComponentLike
-
- All Implemented Interfaces:
-
java.util.Map,pers.neige.neigeitems.libs.bot.inker.bukkit.nbt.api.NbtLike
public interface NbtComponentLike implements NbtLike, Map<K, V>
-
-
Method Summary
Modifier and Type Method Description abstract Nbt<out Object>get(String key)Nbt<out Object>get(Object key)abstract booleancontainsKey(String key)booleancontainsKey(Object key)abstract Nbt<out Object>remove(String key)Nbt<out Object>remove(Object key)Nbt<out Object>removeDeep(@NonNull() String key)Nbt<out Object>removeDeep(@NonNull() String key, char separator, char escape)booleancontains(Object key)booleancontains(String key)voiddelete(Object key)voiddelete(String key)voidset(String key, Nbt<out Object> value)voidputByte(String key, byte value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputShort(String key, short value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputInt(String key, int value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputLong(String key, long value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputUUID(String key, UUID value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputFloat(String key, float value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputDouble(String key, double value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputString(String key, String value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputByteArray(String key, Array<byte> value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputByteArray(String key, List<Byte> value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputIntArray(String key, Array<int> value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputIntArray(String key, List<Integer> value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputLongArray(String key, Array<long> value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputLongArray(String key, List<Long> value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. voidputBoolean(String key, boolean value)等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例. bytegetTagType(String key)获取指定 NBT键 对应的 NBT值 的 NBT类型. booleancontains(String key, int value)检测指定 NBT键 对应的 NBT值 是否属于对应类型. bytegetByte(@NonNull() String key)根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 0. BytegetByteOrNull(@NonNull() String key)根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 null. bytegetByte(@NonNull() String key, byte def)根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回默认值. shortgetShort(@NonNull() String key)根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 0. ShortgetShortOrNull(@NonNull() String key)根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 null. shortgetShort(@NonNull() String key, short def)根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回默认值. intgetInt(@NonNull() String key)根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 0. IntegergetIntOrNull(@NonNull() String key)根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 null. intgetInt(@NonNull() String key, int def)根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回默认值. longgetLong(@NonNull() String key)根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 0. LonggetLongOrNull(@NonNull() String key)根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 null. longgetLong(@NonNull() String key, long def)根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回默认值. UUIDgetUUID(@NonNull() String key)根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null. UUIDgetUUIDOrNull(@NonNull() String key)根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null. UUIDgetUUID(@NonNull() String key, @Nullable() UUID def)根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回默认值. floatgetFloat(@NonNull() String key)根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 0. FloatgetFloatOrNull(@NonNull() String key)根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 null. floatgetFloat(@NonNull() String key, float def)根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回默认值. doublegetDouble(@NonNull() String key)根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 0. DoublegetDoubleOrNull(@NonNull() String key)根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 null. doublegetDouble(@NonNull() String key, double def)根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回默认值. StringgetString(@NonNull() String key)根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null. StringgetStringOrNull(@NonNull() String key)根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null. StringgetString(@NonNull() String key, @Nullable() String def)根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回默认值. Array<byte>getByteArray(@NonNull() String key)根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回空数组. Array<byte>getByteArrayOrNull(@NonNull() String key)根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回 null. Array<byte>getByteArray(@NonNull() String key, Array<byte> def)根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回默认值. Array<int>getIntArray(@NonNull() String key)根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回空数组. Array<int>getIntArrayOrNull(@NonNull() String key)根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回 null. Array<int>getIntArray(@NonNull() String key, Array<int> def)根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回默认值. Array<long>getLongArray(@NonNull() String key)根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回空数组. Array<long>getLongArrayOrNull(@NonNull() String key)根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回 null. Array<long>getLongArray(@NonNull() String key, Array<long> def)根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回默认值. NbtCompoundgetCompound(@NonNull() String key)根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null. NbtCompoundgetCompoundOrNull(@NonNull() String key)根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null. NbtCompoundgetCompound(@NonNull() String key, @Nullable() NbtCompound def)根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回默认值. NbtCompoundgetOrCreateCompound(@NonNull() String key)根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则设置并返回一个空 NbtCompound. NbtListgetList(@NonNull() String key)根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null. NbtListgetListOrNull(@NonNull() String key)根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null. NbtListgetList(@NonNull() String key, @Nullable() NbtList def)根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回默认值. NbtListgetOrCreateList(@NonNull() String key)根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则设置并返回一个空 NbtList. NbtListgetList(String key, int elementType)根据 NBT键 和 NBT类型 获取对应的 NbtList, 如果没有找到对应的 NbtList 或 类型不符 则返回 null. booleangetBoolean(@NonNull() String key)根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 false. BooleangetBooleanOrNull(@NonNull() String key)根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 null. booleangetBoolean(@NonNull() String key, boolean def)根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回默认值. Nbt<out Object>getDeep(@NonNull() String key, char separator, char escape)根据 NBT键 获取对应的 Nbt, 如果没有找到对应的 Nbt 则返回 null. Nbt<out Object>getDeep(@NonNull() String key)根据 NBT键 获取对应的 Nbt, 如果没有找到对应的 Nbt 则返回 null. bytegetDeepByte(@NonNull() String key)根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 (byte) 0. BytegetDeepByteOrNull(@NonNull() String key)根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 null. bytegetDeepByte(@NonNull() String key, byte def)根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回默认值. shortgetDeepShort(@NonNull() String key)根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 (short) 0. ShortgetDeepShortOrNull(@NonNull() String key)根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 null. shortgetDeepShort(@NonNull() String key, short def)根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回默认值. intgetDeepInt(@NonNull() String key)根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 0. IntegergetDeepIntOrNull(@NonNull() String key)根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 null. intgetDeepInt(@NonNull() String key, int def)根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回默认值. longgetDeepLong(@NonNull() String key)根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 0. LonggetDeepLongOrNull(@NonNull() String key)根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 null. longgetDeepLong(@NonNull() String key, long def)根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回默认值. UUIDgetDeepUUID(@NonNull() String key)根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null. UUIDgetDeepUUIDOrNull(@NonNull() String key)根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null. UUIDgetDeepUUID(@NonNull() String key, @Nullable() UUID def)根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回默认值. floatgetDeepFloat(@NonNull() String key)根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 0.0F. FloatgetDeepFloatOrNull(@NonNull() String key)根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 null. floatgetDeepFloat(@NonNull() String key, float def)根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回默认值. doublegetDeepDouble(@NonNull() String key)根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 0.0D. DoublegetDeepDoubleOrNull(@NonNull() String key)根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 null. doublegetDeepDouble(@NonNull() String key, double def)根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回默认值. StringgetDeepString(@NonNull() String key)根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null. StringgetDeepStringOrNull(@NonNull() String key)根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null. StringgetDeepString(@NonNull() String key, @Nullable() String def)根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回默认值. Array<byte>getDeepByteArray(@NonNull() String key)根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回空数组. Array<byte>getDeepByteArrayOrNull(@NonNull() String key)根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回 null. Array<byte>getDeepByteArray(@NonNull() String key, Array<byte> def)根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回默认值. Array<int>getDeepIntArray(@NonNull() String key)根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回空数组. Array<int>getDeepIntArrayOrNull(@NonNull() String key)根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回 null. Array<int>getDeepIntArray(@NonNull() String key, Array<int> def)根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回默认值. Array<long>getDeepLongArray(@NonNull() String key)根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回空数组. Array<long>getDeepLongArrayOrNull(@NonNull() String key)根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回 null. Array<long>getDeepLongArray(@NonNull() String key, Array<long> def)根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回默认值. NbtCompoundgetDeepCompound(@NonNull() String key)根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null. NbtCompoundgetDeepCompoundOrNull(@NonNull() String key)根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null. NbtCompoundgetDeepCompound(@NonNull() String key, @Nullable() NbtCompound def)根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回默认值. NbtListgetDeepList(@NonNull() String key)根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null. NbtListgetDeepListOrNull(@NonNull() String key)根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null. NbtListgetDeepList(@NonNull() String key, @Nullable() NbtList def)根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回默认值. booleangetDeepBoolean(@NonNull() String key)根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 false. BooleangetDeepBooleanOrNull(@NonNull() String key)根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 null. booleangetDeepBoolean(@NonNull() String key, boolean def)根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回默认值. voidputDeep(@NonNull() String key, @NonNull() Nbt<out Object> value, boolean force, char separator, char escape)voidputDeep(@NonNull() String key, @NonNull() Nbt<out Object> value, boolean force)voidputDeep(@NonNull() String key, @NonNull() Nbt<out Object> value)voidputDeepByte(@NonNull() String key, byte value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepByte(@NonNull() String key, byte value)将指定的 NBT键 设置为给定值. voidputDeepShort(@NonNull() String key, short value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepShort(@NonNull() String key, short value)将指定的 NBT键 设置为给定值. voidputDeepInt(@NonNull() String key, int value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepInt(@NonNull() String key, int value)将指定的 NBT键 设置为给定值. voidputDeepLong(@NonNull() String key, long value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepLong(@NonNull() String key, long value)将指定的 NBT键 设置为给定值. voidputDeepFloat(@NonNull() String key, float value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepFloat(@NonNull() String key, float value)将指定的 NBT键 设置为给定值. voidputDeepDouble(@NonNull() String key, double value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepDouble(@NonNull() String key, double value)将指定的 NBT键 设置为给定值. voidputDeepString(@NonNull() String key, @NonNull() String value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepString(@NonNull() String key, @NonNull() String value)将指定的 NBT键 设置为给定值. voidputDeepByteArray(@NonNull() String key, Array<byte> value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepByteArray(@NonNull() String key, Array<byte> value)将指定的 NBT键 设置为给定值. voidputDeepByteArray(@NonNull() String key, @NonNull() List<Byte> value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepByteArray(@NonNull() String key, @NonNull() List<Byte> value)将指定的 NBT键 设置为给定值. voidputDeepIntArray(@NonNull() String key, Array<int> value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepIntArray(@NonNull() String key, Array<int> value)将指定的 NBT键 设置为给定值. voidputDeepIntArray(@NonNull() String key, @NonNull() List<Integer> value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepIntArray(@NonNull() String key, @NonNull() List<Integer> value)将指定的 NBT键 设置为给定值. voidputDeepLongArray(@NonNull() String key, Array<long> value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepLongArray(@NonNull() String key, Array<long> value)将指定的 NBT键 设置为给定值. voidputDeepLongArray(@NonNull() String key, @NonNull() List<Long> value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepLongArray(@NonNull() String key, @NonNull() List<Long> value)将指定的 NBT键 设置为给定值. voidputDeepBoolean(@NonNull() String key, boolean value, boolean force)将指定的 NBT键 设置为给定值. voidputDeepBoolean(@NonNull() String key, boolean value)将指定的 NBT键 设置为给定值. abstract NbtComponentLikeclone()-
Methods inherited from class pers.neige.neigeitems.libs.bot.inker.bukkit.nbt.api.NbtLike
getAsString, getId -
Methods inherited from class java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, copyOf, entry, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, of, ofEntries, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, values -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
containsKey
abstract boolean containsKey(String key)
-
containsKey
boolean containsKey(Object key)
-
removeDeep
Nbt<out Object> removeDeep(@NonNull() String key)
-
removeDeep
Nbt<out Object> removeDeep(@NonNull() String key, char separator, char escape)
-
putByte
void putByte(String key, byte value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putShort
void putShort(String key, short value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putInt
void putInt(String key, int value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putLong
void putLong(String key, long value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putUUID
void putUUID(String key, UUID value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putFloat
void putFloat(String key, float value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putDouble
void putDouble(String key, double value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putString
void putString(String key, String value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putByteArray
void putByteArray(String key, Array<byte> value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putByteArray
void putByteArray(String key, List<Byte> value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putIntArray
void putIntArray(String key, Array<int> value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putIntArray
void putIntArray(String key, List<Integer> value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putLongArray
void putLongArray(String key, Array<long> value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putLongArray
void putLongArray(String key, List<Long> value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
putBoolean
void putBoolean(String key, boolean value)
等价于 Map#put(Object, Object) 方法, 区别在于将 value 转换为了对应类型的 NBT实例.
-
getTagType
byte getTagType(String key)
获取指定 NBT键 对应的 NBT值 的 NBT类型.
- Parameters:
key- 待检测的 NBT键.- Returns:
指定 NBT键 对应的 NBT值 的 NBT类型, 数字与类型的对应关系详见 pers.neige.neigeitems.libs.bot.inker.bukkit.nbt.NbtType 类所属的公有静态变量.
-
contains
boolean contains(String key, int value)
检测指定 NBT键 对应的 NBT值 是否属于对应类型.
- Parameters:
key- 待检测的 NBT键.value- NBT类型, 数字与类型的对应关系详见 pers.neige.neigeitems.libs.bot.inker.bukkit.nbt.NbtType 类所属的公有静态变量.- Returns:
指定 NBT键 对应的 NBT值 是否属于对应类型.
-
getByte
byte getByte(@NonNull() String key)
根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 0.
- Parameters:
key- 要获取 byte 的 NBT键.- Returns:
待查找的 byte.
-
getByteOrNull
@Nullable() Byte getByteOrNull(@NonNull() String key)
根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 null.
- Parameters:
key- 要获取 byte 的 NBT键.- Returns:
待查找的 byte.
-
getByte
byte getByte(@NonNull() String key, byte def)
根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回默认值.
- Parameters:
key- 要获取 byte 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 byte.
-
getShort
short getShort(@NonNull() String key)
根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 0.
- Parameters:
key- 要获取 short 的 NBT键.- Returns:
待查找的 short.
-
getShortOrNull
@Nullable() Short getShortOrNull(@NonNull() String key)
根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 null.
- Parameters:
key- 要获取 short 的 NBT键.- Returns:
待查找的 short.
-
getShort
short getShort(@NonNull() String key, short def)
根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回默认值.
- Parameters:
key- 要获取 short 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 short.
-
getInt
int getInt(@NonNull() String key)
根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 0.
- Parameters:
key- 要获取 int 的 NBT键.- Returns:
待查找的 int.
-
getIntOrNull
@Nullable() Integer getIntOrNull(@NonNull() String key)
根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 null.
- Parameters:
key- 要获取 int 的 NBT键.- Returns:
待查找的 int.
-
getInt
int getInt(@NonNull() String key, int def)
根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回默认值.
- Parameters:
key- 要获取 int 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 int.
-
getLong
long getLong(@NonNull() String key)
根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 0.
- Parameters:
key- 要获取 long 的 NBT键.- Returns:
待查找的 long.
-
getLongOrNull
@Nullable() Long getLongOrNull(@NonNull() String key)
根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 null.
- Parameters:
key- 要获取 long 的 NBT键.- Returns:
待查找的 long.
-
getLong
long getLong(@NonNull() String key, long def)
根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回默认值.
- Parameters:
key- 要获取 long 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 long.
-
getUUID
@Nullable() UUID getUUID(@NonNull() String key)
根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null.
- Parameters:
key- 要获取 UUID 的 NBT键.- Returns:
待查找的 UUID.
-
getUUIDOrNull
@Nullable() UUID getUUIDOrNull(@NonNull() String key)
根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null.
- Parameters:
key- 要获取 UUID 的 NBT键.- Returns:
待查找的 UUID.
-
getUUID
@Contract(value = "_, !null -> !null")@Nullable() UUID getUUID(@NonNull() String key, @Nullable() UUID def)
根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回默认值.
- Parameters:
key- 要获取 UUID 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 UUID, 则返回的默认值.- Returns:
待查找的 UUID.
-
getFloat
float getFloat(@NonNull() String key)
根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 0.
- Parameters:
key- 要获取 float 的 NBT键.- Returns:
待查找的 float.
-
getFloatOrNull
@Nullable() Float getFloatOrNull(@NonNull() String key)
根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 null.
- Parameters:
key- 要获取 float 的 NBT键.- Returns:
待查找的 float.
-
getFloat
float getFloat(@NonNull() String key, float def)
根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回默认值.
- Parameters:
key- 要获取 float 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 float.
-
getDouble
double getDouble(@NonNull() String key)
根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 0.
- Parameters:
key- 要获取 double 的 NBT键.- Returns:
待查找的 double.
-
getDoubleOrNull
@Nullable() Double getDoubleOrNull(@NonNull() String key)
根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 null.
- Parameters:
key- 要获取 double 的 NBT键.- Returns:
待查找的 double.
-
getDouble
double getDouble(@NonNull() String key, double def)
根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回默认值.
- Parameters:
key- 要获取 double 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 double.
-
getString
@Nullable() String getString(@NonNull() String key)
根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null.
- Parameters:
key- 要获取 String 的 NBT键.- Returns:
待查找的 String.
-
getStringOrNull
@Nullable() String getStringOrNull(@NonNull() String key)
根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null.
- Parameters:
key- 要获取 String 的 NBT键.- Returns:
待查找的 String.
-
getString
@Contract(value = "_, !null -> !null")@Nullable() String getString(@NonNull() String key, @Nullable() String def)
根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回默认值.
- Parameters:
key- 要获取 String 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不存在, 则返回的默认值.- Returns:
待查找的 String.
-
getByteArray
Array<byte> getByteArray(@NonNull() String key)
根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回空数组.
- Parameters:
key- 要获取 byte[] 的 NBT键.- Returns:
待查找的 byte[].
-
getByteArrayOrNull
Array<byte> getByteArrayOrNull(@NonNull() String key)
根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回 null.
- Parameters:
key- 要获取 byte[] 的 NBT键.- Returns:
待查找的 byte[].
-
getByteArray
@Contract(value = "_, !null -> !null") Array<byte> getByteArray(@NonNull() String key, Array<byte> def)
根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回默认值.
- Parameters:
key- 要获取 byte[] 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 byte[], 则返回的默认值.- Returns:
待查找的 byte[].
-
getIntArray
Array<int> getIntArray(@NonNull() String key)
根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回空数组.
- Parameters:
key- 要获取 int[] 的 NBT键.- Returns:
待查找的 int[].
-
getIntArrayOrNull
Array<int> getIntArrayOrNull(@NonNull() String key)
根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回 null.
- Parameters:
key- 要获取 int[] 的 NBT键.- Returns:
待查找的 int[].
-
getIntArray
@Contract(value = "_, !null -> !null") Array<int> getIntArray(@NonNull() String key, Array<int> def)
根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回默认值.
- Parameters:
key- 要获取 int[] 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 int[], 则返回的默认值.- Returns:
待查找的 int[].
-
getLongArray
Array<long> getLongArray(@NonNull() String key)
根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回空数组.
- Parameters:
key- 要获取 long[] 的 NBT键.- Returns:
待查找的 long[].
-
getLongArrayOrNull
Array<long> getLongArrayOrNull(@NonNull() String key)
根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回 null.
- Parameters:
key- 要获取 long[] 的 NBT键.- Returns:
待查找的 long[].
-
getLongArray
@Contract(value = "_, !null -> !null") Array<long> getLongArray(@NonNull() String key, Array<long> def)
根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回默认值.
- Parameters:
key- 要获取 long[] 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 long[], 则返回的默认值.- Returns:
待查找的 long[].
-
getCompound
@Nullable() NbtCompound getCompound(@NonNull() String key)
根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null.
- Parameters:
key- 要获取 NbtCompound 的 NBT键.- Returns:
待查找的 NbtCompound.
-
getCompoundOrNull
@Nullable() NbtCompound getCompoundOrNull(@NonNull() String key)
根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null.
- Parameters:
key- 要获取 NbtCompound 的 NBT键.- Returns:
待查找的 NbtCompound.
-
getCompound
@Contract(value = "_, !null -> !null")@Nullable() NbtCompound getCompound(@NonNull() String key, @Nullable() NbtCompound def)
根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回默认值.
- Parameters:
key- 要获取 NbtCompound 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 NbtCompound, 则返回的默认值.- Returns:
待查找的 NbtCompound.
-
getOrCreateCompound
@NonNull() NbtCompound getOrCreateCompound(@NonNull() String key)
根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则设置并返回一个空 NbtCompound.
- Parameters:
key- 要获取 NbtCompound 的 NBT键.- Returns:
待查找的 NbtCompound.
-
getList
@Nullable() NbtList getList(@NonNull() String key)
根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null.
- Parameters:
key- 要获取 NbtList 的 NBT键.- Returns:
待查找的 NbtList.
-
getListOrNull
@Nullable() NbtList getListOrNull(@NonNull() String key)
根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null.
- Parameters:
key- 要获取 NbtList 的 NBT键.- Returns:
待查找的 NbtList.
-
getList
@Contract(value = "_, !null -> !null")@Nullable() NbtList getList(@NonNull() String key, @Nullable() NbtList def)
根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回默认值.
- Parameters:
key- 要获取 NbtList 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 NbtList, 则返回的默认值.- Returns:
待查找的 NbtList.
-
getOrCreateList
@NonNull() NbtList getOrCreateList(@NonNull() String key)
根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则设置并返回一个空 NbtList.
- Parameters:
key- 要获取 NbtList 的 NBT键.- Returns:
待查找的 NbtList.
-
getList
@Nullable() NbtList getList(String key, int elementType)
根据 NBT键 和 NBT类型 获取对应的 NbtList, 如果没有找到对应的 NbtList 或 类型不符 则返回 null.
- Parameters:
key- 要获取 NbtList 的 NBT键.elementType- NbtList 的 期望类型(可藉由 NbtType 类传入).- Returns:
待查找的 NbtList.
-
getBoolean
boolean getBoolean(@NonNull() String key)
根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 false.
- Parameters:
key- 要获取 boolean 的 NBT键.- Returns:
待查找的 boolean.
-
getBooleanOrNull
@Nullable() Boolean getBooleanOrNull(@NonNull() String key)
根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 null.
- Parameters:
key- 要获取 boolean 的 NBT键.- Returns:
待查找的 boolean.
-
getBoolean
boolean getBoolean(@NonNull() String key, boolean def)
根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回默认值.
- Parameters:
key- 要获取 boolean 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 boolean, 则返回的默认值.- Returns:
待查找的 boolean.
-
getDeep
@Nullable() Nbt<out Object> getDeep(@NonNull() String key, char separator, char escape)
根据 NBT键 获取对应的 Nbt, 如果没有找到对应的 Nbt 则返回 null. 例如 key 填写 "test.test\\.test", separator 填写 '.', escape 填写 '\\'. 最后将获取键为 "test" 的 NbtComponentLike 下键为 "test.test" 的 NbtLike 的值.
- Parameters:
key- 要获取 Nbt 的 NBT键.separator- 多级NBT键分隔符.escape- 分隔符转义符.- Returns:
待查找的 Nbt.
-
getDeep
@Nullable() Nbt<out Object> getDeep(@NonNull() String key)
根据 NBT键 获取对应的 Nbt, 如果没有找到对应的 Nbt 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 Nbt 的 NBT键.- Returns:
待查找的 Nbt.
-
getDeepByte
byte getDeepByte(@NonNull() String key)
根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 (byte) 0. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 byte 的 NBT键.- Returns:
待查找的 byte.
-
getDeepByteOrNull
@Nullable() Byte getDeepByteOrNull(@NonNull() String key)
根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 byte 的 NBT键.- Returns:
待查找的 byte.
-
getDeepByte
byte getDeepByte(@NonNull() String key, byte def)
根据 NBT键 获取对应的 byte, 如果没有找到对应的 byte 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 byte 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 byte.
-
getDeepShort
short getDeepShort(@NonNull() String key)
根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 (short) 0. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 short 的 NBT键.- Returns:
待查找的 short.
-
getDeepShortOrNull
@Nullable() Short getDeepShortOrNull(@NonNull() String key)
根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 short 的 NBT键.- Returns:
待查找的 short.
-
getDeepShort
short getDeepShort(@NonNull() String key, short def)
根据 NBT键 获取对应的 short, 如果没有找到对应的 short 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 short 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 short.
-
getDeepInt
int getDeepInt(@NonNull() String key)
根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 0. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 int 的 NBT键.- Returns:
待查找的 int.
-
getDeepIntOrNull
@Nullable() Integer getDeepIntOrNull(@NonNull() String key)
根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 int 的 NBT键.- Returns:
待查找的 int.
-
getDeepInt
int getDeepInt(@NonNull() String key, int def)
根据 NBT键 获取对应的 int, 如果没有找到对应的 int 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 int 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 int.
-
getDeepLong
long getDeepLong(@NonNull() String key)
根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 0. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 long 的 NBT键.- Returns:
待查找的 long.
-
getDeepLongOrNull
@Nullable() Long getDeepLongOrNull(@NonNull() String key)
根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 long 的 NBT键.- Returns:
待查找的 long.
-
getDeepLong
long getDeepLong(@NonNull() String key, long def)
根据 NBT键 获取对应的 long, 如果没有找到对应的 long 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 long 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 long.
-
getDeepUUID
@Nullable() UUID getDeepUUID(@NonNull() String key)
根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 UUID 的 NBT键.- Returns:
待查找的 UUID.
-
getDeepUUIDOrNull
@Nullable() UUID getDeepUUIDOrNull(@NonNull() String key)
根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 UUID 的 NBT键.- Returns:
待查找的 UUID.
-
getDeepUUID
@Contract(value = "_, !null -> !null")@Nullable() UUID getDeepUUID(@NonNull() String key, @Nullable() UUID def)
根据 NBT键 获取对应的 UUID, 如果没有找到对应的 UUID 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 UUID 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 UUID, 则返回的默认值.- Returns:
待查找的 UUID.
-
getDeepFloat
float getDeepFloat(@NonNull() String key)
根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 0.0F. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 float 的 NBT键.- Returns:
待查找的 float.
-
getDeepFloatOrNull
@Nullable() Float getDeepFloatOrNull(@NonNull() String key)
根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 float 的 NBT键.- Returns:
待查找的 float.
-
getDeepFloat
float getDeepFloat(@NonNull() String key, float def)
根据 NBT键 获取对应的 float, 如果没有找到对应的 float 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 float 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 float.
-
getDeepDouble
double getDeepDouble(@NonNull() String key)
根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 0.0D. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 double 的 NBT键.- Returns:
待查找的 double.
-
getDeepDoubleOrNull
@Nullable() Double getDeepDoubleOrNull(@NonNull() String key)
根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 double 的 NBT键.- Returns:
待查找的 double.
-
getDeepDouble
double getDeepDouble(@NonNull() String key, double def)
根据 NBT键 获取对应的 double, 如果没有找到对应的 double 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 double 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 数字, 则返回的默认值.- Returns:
待查找的 double.
-
getDeepString
@Nullable() String getDeepString(@NonNull() String key)
根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 String 的 NBT键.- Returns:
待查找的 String.
-
getDeepStringOrNull
@Nullable() String getDeepStringOrNull(@NonNull() String key)
根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 String 的 NBT键.- Returns:
待查找的 String.
-
getDeepString
@Contract(value = "_, !null -> !null")@Nullable() String getDeepString(@NonNull() String key, @Nullable() String def)
根据 NBT键 获取对应的 String, 如果没有找到对应的 String 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 String 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 String, 则返回的默认值.- Returns:
待查找的 String.
-
getDeepByteArray
Array<byte> getDeepByteArray(@NonNull() String key)
根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回空数组. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 byte[] 的 NBT键.- Returns:
待查找的 byte[].
-
getDeepByteArrayOrNull
Array<byte> getDeepByteArrayOrNull(@NonNull() String key)
根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 byte[] 的 NBT键.- Returns:
待查找的 byte[].
-
getDeepByteArray
@Contract(value = "_, !null -> !null") Array<byte> getDeepByteArray(@NonNull() String key, Array<byte> def)
根据 NBT键 获取对应的 byte[], 如果没有找到对应的 byte[] 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 byte[] 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 byte[], 则返回的默认值.- Returns:
待查找的 byte[].
-
getDeepIntArray
Array<int> getDeepIntArray(@NonNull() String key)
根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回空数组. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 int[] 的 NBT键.- Returns:
待查找的 int[].
-
getDeepIntArrayOrNull
Array<int> getDeepIntArrayOrNull(@NonNull() String key)
根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 int[] 的 NBT键.- Returns:
待查找的 int[].
-
getDeepIntArray
@Contract(value = "_, !null -> !null") Array<int> getDeepIntArray(@NonNull() String key, Array<int> def)
根据 NBT键 获取对应的 int[], 如果没有找到对应的 int[] 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 int[] 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 int[], 则返回的默认值.- Returns:
待查找的 int[].
-
getDeepLongArray
Array<long> getDeepLongArray(@NonNull() String key)
根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回空数组. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 long[] 的 NBT键.- Returns:
待查找的 long[].
-
getDeepLongArrayOrNull
Array<long> getDeepLongArrayOrNull(@NonNull() String key)
根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 long[] 的 NBT键.- Returns:
待查找的 long[].
-
getDeepLongArray
@Contract(value = "_, !null -> !null") Array<long> getDeepLongArray(@NonNull() String key, Array<long> def)
根据 NBT键 获取对应的 long[], 如果没有找到对应的 long[] 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 long[] 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 long[], 则返回的默认值.- Returns:
待查找的 long[].
-
getDeepCompound
@Nullable() NbtCompound getDeepCompound(@NonNull() String key)
根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 NbtCompound 的 NBT键.- Returns:
待查找的 NbtCompound.
-
getDeepCompoundOrNull
@Nullable() NbtCompound getDeepCompoundOrNull(@NonNull() String key)
根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 NbtCompound 的 NBT键.- Returns:
待查找的 NbtCompound.
-
getDeepCompound
@Contract(value = "_, !null -> !null")@Nullable() NbtCompound getDeepCompound(@NonNull() String key, @Nullable() NbtCompound def)
根据 NBT键 获取对应的 NbtCompound, 如果没有找到对应的 NbtCompound 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 NbtCompound 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 NbtCompound, 则返回的默认值.- Returns:
待查找的 NbtCompound.
-
getDeepList
@Nullable() NbtList getDeepList(@NonNull() String key)
根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 NbtList 的 NBT键.- Returns:
待查找的 NbtList.
-
getDeepListOrNull
@Nullable() NbtList getDeepListOrNull(@NonNull() String key)
根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 NbtList 的 NBT键.- Returns:
待查找的 NbtList.
-
getDeepList
@Contract(value = "_, !null -> !null")@Nullable() NbtList getDeepList(@NonNull() String key, @Nullable() NbtList def)
根据 NBT键 获取对应的 NbtList, 如果没有找到对应的 NbtList 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 NbtList 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 NbtList, 则返回的默认值.- Returns:
待查找的 NbtList.
-
getDeepBoolean
boolean getDeepBoolean(@NonNull() String key)
根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 false. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 boolean 的 NBT键.- Returns:
待查找的 boolean.
-
getDeepBooleanOrNull
@Nullable() Boolean getDeepBooleanOrNull(@NonNull() String key)
根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回 null. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 boolean 的 NBT键.- Returns:
待查找的 boolean.
-
getDeepBoolean
boolean getDeepBoolean(@NonNull() String key, boolean def)
根据 NBT键 获取对应的 boolean, 如果没有找到对应的 boolean 则返回默认值. NBT键 以 . 做分隔符.
- Parameters:
key- 要获取 boolean 的 NBT键.def- 如果找不到对应的 NBT 或对应的 NBT 不是 boolean, 则返回的默认值.- Returns:
待查找的 boolean.
-
putDeep
void putDeep(@NonNull() String key, @NonNull() Nbt<out Object> value, boolean force, char separator, char escape)
-
putDeepByte
void putDeepByte(@NonNull() String key, byte value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepByte
void putDeepByte(@NonNull() String key, byte value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepShort
void putDeepShort(@NonNull() String key, short value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepShort
void putDeepShort(@NonNull() String key, short value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepInt
void putDeepInt(@NonNull() String key, int value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepInt
void putDeepInt(@NonNull() String key, int value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepLong
void putDeepLong(@NonNull() String key, long value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepLong
void putDeepLong(@NonNull() String key, long value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepFloat
void putDeepFloat(@NonNull() String key, float value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepFloat
void putDeepFloat(@NonNull() String key, float value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepDouble
void putDeepDouble(@NonNull() String key, double value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepDouble
void putDeepDouble(@NonNull() String key, double value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepString
void putDeepString(@NonNull() String key, @NonNull() String value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepString
void putDeepString(@NonNull() String key, @NonNull() String value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepByteArray
void putDeepByteArray(@NonNull() String key, Array<byte> value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepByteArray
void putDeepByteArray(@NonNull() String key, Array<byte> value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepByteArray
void putDeepByteArray(@NonNull() String key, @NonNull() List<Byte> value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepByteArray
void putDeepByteArray(@NonNull() String key, @NonNull() List<Byte> value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepIntArray
void putDeepIntArray(@NonNull() String key, Array<int> value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepIntArray
void putDeepIntArray(@NonNull() String key, Array<int> value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepIntArray
void putDeepIntArray(@NonNull() String key, @NonNull() List<Integer> value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepIntArray
void putDeepIntArray(@NonNull() String key, @NonNull() List<Integer> value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepLongArray
void putDeepLongArray(@NonNull() String key, Array<long> value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepLongArray
void putDeepLongArray(@NonNull() String key, Array<long> value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepLongArray
void putDeepLongArray(@NonNull() String key, @NonNull() List<Long> value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepLongArray
void putDeepLongArray(@NonNull() String key, @NonNull() List<Long> value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
putDeepBoolean
void putDeepBoolean(@NonNull() String key, boolean value, boolean force)
将指定的 NBT键 设置为给定值. 若 force 为 false 且对应的 key 无效, 则不进行设置. 若 force 为 true 且对应的 key 无效, 则进行强制设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. 强制设置的例子: 你想要将 t1.t2.t3 设置为一个 1, t1.t2 的值不是 NbtCompound, 则强制将 t1.t2 的值设置为 new NbtCompound(). NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.force- key 无效时是否强制设置.
-
putDeepBoolean
void putDeepBoolean(@NonNull() String key, boolean value)
将指定的 NBT键 设置为给定值. 若对应的 key 无效, 则不进行设置. key 无效的例子: 你想要将 t1.t2.t3 设置为一个 1, 这需要 t1.t2 的值是 NbtCompound, 如果 t1.t2 的值不是 NbtCompound, 则 key 无效. NBT键 以 . 做分隔符.
- Parameters:
key- 待设置的 NBT键.value- 待设置的 NBT键 的新值.
-
clone
abstract NbtComponentLike clone()
-
-
-
-