Added some message, fixed problem with packet reading

This commit is contained in:
LOOHP
2020-08-04 23:44:58 +08:00
parent b01cbad932
commit 4600303f96
11 changed files with 330 additions and 16 deletions
@@ -0,0 +1,30 @@
package com.loohp.limbo.Server.Packets;
import java.io.DataInputStream;
import java.io.IOException;
import com.loohp.limbo.Utils.DataTypeIO;
public class PacketPlayInTabComplete extends PacketIn {
private int id;
private String text;
public PacketPlayInTabComplete(int id, String text) {
this.id = id;
this.text = text;
}
public PacketPlayInTabComplete(DataInputStream in) throws IOException {
this(DataTypeIO.readVarInt(in), DataTypeIO.readString(in));
}
public int getId() {
return id;
}
public String getText() {
return text;
}
}