add api to get protocol version (for version check in the future)

This commit is contained in:
ajgeiss0702
2021-08-25 13:56:23 -07:00
parent 1125dbeb85
commit 72e5c86629
3 changed files with 16 additions and 0 deletions
@@ -124,6 +124,11 @@ public class BungeePlayer implements AdaptedPlayer, Audience {
handle.connect(((BungeeServer) server).getHandle());
}
@Override
public int getProtocolVersion() {
return handle.getPendingConnection().getVersion();
}
@Override
public String getName() {
return handle.getName();
@@ -131,6 +131,11 @@ public class VelocityPlayer implements AdaptedPlayer, Audience {
);
}
@Override
public int getProtocolVersion() {
return handle.getProtocolVersion().getProtocol();
}
@Override
public String getName() {
return handle.getUsername();