Make it compie

This commit is contained in:
Nassim Jahnke
2022-07-28 00:20:14 +02:00
parent 365fe29e02
commit d1727177ba
5 changed files with 24 additions and 12 deletions

View File

@@ -164,9 +164,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ //noinspection NonStrictComparisonCanBeEquality
+ if (version >= com.destroystokyo.paper.proxy.VelocityProxy.MODERN_FORWARDING_WITH_KEY) {
+ final ProfilePublicKey.Data forwardedKey = com.destroystokyo.paper.proxy.VelocityProxy.readForwardedKey(buf);
+ if (this.playerProfilePublicKey == null) {
+ if (this.profilePublicKeyData == null) {
+ try {
+ this.playerProfilePublicKey = ProfilePublicKey.createValidated(this.server.getServiceSignatureValidator(), forwardedKey);
+ ProfilePublicKey.createValidated(this.server.getServiceSignatureValidator(), this.gameProfile.getId(), forwardedKey);
+ this.profilePublicKeyData = forwardedKey;
+ } catch (CryptException e) {
+ this.disconnect("Unable to validate forwarded player key");
+ }