Skip to content

Commit d65e70e

Browse files
committed
Make setUUID return fluent interface
1 parent de25449 commit d65e70e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/main/java/org/glavo/nbt/tag/IntArrayTag.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ public IntArrayTag setAll(int... array) { // Override to use varargs
141141
/// Sets the value of the tag from a UUID.
142142
///
143143
/// Calling this method will clear the current array, all subtags will be removed.
144-
@Contract(mutates = "this")
145-
public void setUUID(UUID uuid) {
144+
@Contract(value = "_ -> this", mutates = "this")
145+
public IntArrayTag setUUID(UUID uuid) {
146146
int[] array = new int[4];
147147
array[0] = (int) (uuid.getMostSignificantBits() >>> 32);
148148
array[1] = (int) (uuid.getMostSignificantBits() & 0xFFFF_FFFFL);
@@ -151,6 +151,7 @@ public void setUUID(UUID uuid) {
151151

152152
clear();
153153
setArrayWithoutClone(array, 4);
154+
return this;
154155
}
155156

156157
/// Appends the specified value to the end of this array.

0 commit comments

Comments
 (0)