3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Merge pull request #1119 from creeper123123321/master

Fix breaking change caused by VelocityPowered/Velocity@853fd22
Dieser Commit ist enthalten in:
Myles 2018-12-13 10:03:45 +00:00 committet von GitHub
Commit 94422dab77
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -18,7 +18,8 @@ public class VelocityVersionProvider extends VersionProvider {
public int getServerProtocol(UserConnection user) throws Exception {
// TODO Have one constant list forever until restart? (Might limit plugins if they change this)
List<Integer> sorted = new ArrayList<>(com.velocitypowered.api.network.ProtocolVersion.ID_TO_PROTOCOL_CONSTANT.keySet());
sorted.remove(Integer.valueOf(-1)); // Unknown/legacy
sorted.remove(Integer.valueOf(-1)); // Unknown
sorted.remove(Integer.valueOf(-2)); // Legacy
Collections.sort(sorted);
int playerVersion = user.get(ProtocolInfo.class).getProtocolVersion();