Expose client protocol version and virtual host

This commit is contained in:
Minecrell
2017-10-10 18:45:20 +02:00
parent 70e24c1b60
commit 8838089321
4 changed files with 83 additions and 8 deletions

View File

@@ -31,7 +31,15 @@
switch (packet.intention()) {
case LOGIN:
this.beginLogin(packet, false);
@@ -59,19 +74,112 @@
@@ -55,23 +70,120 @@
throw new UnsupportedOperationException("Invalid intention " + String.valueOf(packet.intention()));
}
+ // Paper start - NetworkClient implementation
+ this.connection.protocolVersion = packet.protocolVersion();
+ this.connection.virtualHost = com.destroystokyo.paper.network.PaperNetworkClient.prepareVirtualHost(packet.hostName(), packet.port());
+ // Paper end
}
private void beginLogin(ClientIntentionPacket packet, boolean transfer) {
this.connection.setupOutboundProtocol(LoginProtocols.CLIENTBOUND);