Expose client protocol version and virtual host
This commit is contained in:
1 parent
70e24c1b60
commit
8838089321
4 files changed
+83
-8
No files matched your search
@@ -341,6 +341,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().transferCookieConnection.sendPacket(new ClientboundTransferPacket(host, port));
|
||||
}
|
||||
|
||||
// Paper start - Implement NetworkClient
|
||||
@Override
|
||||
public int getProtocolVersion() {
|
||||
if (getHandle().connection == null) return -1;
|
||||
return getHandle().connection.connection.protocolVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InetSocketAddress getVirtualHost() {
|
||||
if (getHandle().connection == null) return null;
|
||||
return getHandle().connection.connection.virtualHost;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@Override
|
||||
public double getEyeHeight(boolean ignorePose) {
|
||||
if (ignorePose) {
|
||||
|
||||
Reference in new issue
Block a user