Package net.kyori.adventure.nbt
Interface CompoundTagSetter<R>
- Type Parameters:
R- the return type
- All Known Subinterfaces:
CompoundBinaryTag,CompoundBinaryTag.Builder
public interface CompoundTagSetter<R>
Common methods between
CompoundBinaryTag and CompoundBinaryTag.Builder.- Since:
- 4.0.0
-
Method Summary
Modifier and Type Method Description @NonNull Rput(@NonNull String key, @NonNull BinaryTag tag)Inserts a tag.default @NonNull RputBoolean(@NonNull String key, boolean value)Inserts a boolean.default @NonNull RputByte(@NonNull String key, byte value)Inserts a byte.default @NonNull RputByteArray(@NonNull String key, byte @NonNull [] value)Inserts an array of bytes.default @NonNull RputDouble(@NonNull String key, double value)Inserts a double.default @NonNull RputFloat(@NonNull String key, float value)Inserts a float.default @NonNull RputInt(@NonNull String key, int value)Inserts an int.default @NonNull RputIntArray(@NonNull String key, int @NonNull [] value)Inserts an array of ints.default @NonNull RputLong(@NonNull String key, long value)Inserts a long.default @NonNull RputLongArray(@NonNull String key, long @NonNull [] value)Inserts an array of longs.default @NonNull RputShort(@NonNull String key, short value)Inserts a short.default @NonNull RputString(@NonNull String key, @NonNull String value)Inserts a string.
-
Method Details
-
put
Inserts a tag.- Parameters:
key- the keytag- the tag- Returns:
- a compound tag
- Since:
- 4.0.0
-
putBoolean
Inserts a boolean.Booleans are stored as a
ByteBinaryTagwith a value of0forfalseand1fortrue.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putByte
Inserts a byte.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putShort
Inserts a short.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putInt
Inserts an int.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putLong
Inserts a long.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putFloat
Inserts a float.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putDouble
Inserts a double.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putByteArray
Inserts an array of bytes.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putString
Inserts a string.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putIntArray
Inserts an array of ints.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-
putLongArray
Inserts an array of longs.- Parameters:
key- the keyvalue- the value- Returns:
- a compound tag
- Since:
- 4.0.0
-