This commit is contained in:
creeper123123321 2018-12-13 07:41:05 -02:00
parent 858e0a5b21
commit b10ca3ebcf
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -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();