From b10ca3ebcfb9418834ef870209fe36291af473bd Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Thu, 13 Dec 2018 07:41:05 -0200 Subject: [PATCH] Fix breaking change caused by VelocityPowered/Velocity@853fd22 --- .../ViaVersion/velocity/providers/VelocityVersionProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityVersionProvider.java b/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityVersionProvider.java index 3b05ce5f2..e156d7720 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityVersionProvider.java +++ b/velocity/src/main/java/us/myles/ViaVersion/velocity/providers/VelocityVersionProvider.java @@ -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 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();