Bridge-protocol: изменен тип данных для TPS
This commit is contained in:
@@ -8,13 +8,13 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class CS_Ping extends Packet {
|
||||
private long time;
|
||||
private int tps;
|
||||
private double tps;
|
||||
private int countPlayers;
|
||||
|
||||
public CS_Ping() {
|
||||
}
|
||||
|
||||
public CS_Ping(long time, int tps, int countPlayers) {
|
||||
public CS_Ping(long time, double tps, int countPlayers) {
|
||||
this.time = time;
|
||||
this.tps = tps;
|
||||
this.countPlayers = countPlayers;
|
||||
@@ -24,7 +24,7 @@ public class CS_Ping extends Packet {
|
||||
return time;
|
||||
}
|
||||
|
||||
public int getTps() {
|
||||
public double getTps() {
|
||||
return tps;
|
||||
}
|
||||
|
||||
@@ -35,14 +35,14 @@ public class CS_Ping extends Packet {
|
||||
@Override
|
||||
public void readSelfData(ByteBuf buffer) {
|
||||
this.time = buffer.readLong();
|
||||
this.tps = buffer.readUnsignedByte();
|
||||
this.tps = buffer.readDouble();
|
||||
this.countPlayers = buffer.readUnsignedShort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSelfData(ByteBuf buffer) {
|
||||
buffer.writeLong(time);
|
||||
buffer.writeByte(tps);
|
||||
buffer.writeDouble(tps);
|
||||
buffer.writeShort(countPlayers);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user