13
0
geforkt von Mirrors/Velocity

Include forwarding version in modern forwarding

This is currently version 1.
Dieser Commit ist enthalten in:
Andrew Steinborn 2018-10-18 14:42:10 -04:00
Ursprung 1d8b11e47b
Commit 19956a2ed7
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -6,5 +6,5 @@ public class VelocityConstants {
} }
public static final String VELOCITY_IP_FORWARDING_CHANNEL = "velocity:player_info"; public static final String VELOCITY_IP_FORWARDING_CHANNEL = "velocity:player_info";
public static final int FORWARDING_VERSION = 1;
} }

Datei anzeigen

@ -123,6 +123,7 @@ public class LoginSessionHandler implements MinecraftSessionHandler {
ByteBuf dataToForward = Unpooled.buffer(); ByteBuf dataToForward = Unpooled.buffer();
ByteBuf finalData = Unpooled.buffer(); ByteBuf finalData = Unpooled.buffer();
try { try {
ProtocolUtils.writeVarInt(dataToForward, VelocityConstants.FORWARDING_VERSION);
ProtocolUtils.writeString(dataToForward, address); ProtocolUtils.writeString(dataToForward, address);
ProtocolUtils.writeUuid(dataToForward, profile.idAsUuid()); ProtocolUtils.writeUuid(dataToForward, profile.idAsUuid());
ProtocolUtils.writeString(dataToForward, profile.getName()); ProtocolUtils.writeString(dataToForward, profile.getName());