Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Woops the new api broke ServerListPlus custom outdated message again fixes #282
Dieser Commit ist enthalten in:
Ursprung
d72b7fc4df
Commit
95ea95be13
@ -40,13 +40,13 @@ public class BaseProtocol extends Protocol {
|
||||
try {
|
||||
JSONObject json = (JSONObject) new JSONParser().parse(originalStatus);
|
||||
JSONObject version = (JSONObject) json.get("version");
|
||||
|
||||
if (ProtocolRegistry.SERVER_PROTOCOL == -1) {
|
||||
Long original = (Long) version.get("protocol");
|
||||
ProtocolRegistry.SERVER_PROTOCOL = original.intValue();
|
||||
}
|
||||
List<Pair<Integer, Protocol>> protocols = ProtocolRegistry.getProtocolPath(info.getProtocolVersion(), ProtocolRegistry.SERVER_PROTOCOL);
|
||||
if (protocols != null) {
|
||||
if ((long) version.get("protocol") != 9999) //Fix serverlistplus
|
||||
version.put("protocol", info.getProtocolVersion());
|
||||
} else {
|
||||
// not compatible :(, *plays very sad violin*
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren