mirror of https://github.com/Minestom/Minestom.git
fix: properly return missing optvarint
This commit is contained in:
parent
f76d421744
commit
129fd8ca0f
|
@ -109,7 +109,8 @@ public final class Metadata {
|
|||
|
||||
@Override
|
||||
public Integer read(@NotNull NetworkBuffer buffer) {
|
||||
return buffer.read(NetworkBuffer.VAR_INT) - 1;
|
||||
int value = buffer.read(NetworkBuffer.VAR_INT);
|
||||
return value == 0 ? null : value - 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue