mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 00:47:26 -04:00
bug fixes (uuid reading, play info, TextComponent null)
This commit is contained in:
parent
4a561d6a01
commit
2d529dfce7
@ -24,6 +24,10 @@ public class TextComponent {
|
||||
JSONObject json;
|
||||
|
||||
public TextComponent(String raw) {
|
||||
if (raw == null) {
|
||||
this.json = new JSONObject();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
this.json = new JSONObject(raw);
|
||||
} catch (JSONException e) {
|
||||
|
@ -88,7 +88,7 @@ public class PacketPlayerInfo implements ClientboundPacket {
|
||||
if (property.isLegacy()) {
|
||||
Log.game(String.format("[TAB] Player info bulk (uuid=%s, name=%s, ping=%d)", property.getUUID(), property.getName(), property.getPing()));
|
||||
} else {
|
||||
Log.game(String.format("[TAB] Player info bulk (uuid=%s, action=%s, name=%s, gameMode=%s, ping=%d)", property.getUUID(), property.getAction(), property.getName(), ((property.getGameMode() == null) ? "null" : property.getGameMode().name()), property.getPing()));
|
||||
Log.game(String.format("[TAB] Player info bulk (uuid=%s, action=%s, name=%s, gameMode=%s, ping=%d, displayName=%s)", property.getUUID(), property.getAction(), property.getName(), ((property.getGameMode() == null) ? "null" : property.getGameMode().name()), property.getPing(), ((property.getDisplayName() == null) ? "null" : property.getDisplayName().getColoredMessage())));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -121,9 +121,7 @@ public class InByteBuffer {
|
||||
|
||||
|
||||
public UUID readUUID() {
|
||||
ByteBuffer buffer = ByteBuffer.allocate(16); // UUID.BYTES
|
||||
buffer.put(readBytes(16));
|
||||
return new UUID(buffer.getLong(0), buffer.getLong(1));
|
||||
return new UUID(readLong(), readLong());
|
||||
}
|
||||
|
||||
public int readVarInt() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user