3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 00:22:51 +01:00

Rewrite BungeeCord's plugin channel format

Dieser Commit ist enthalten in:
creeper123123321 2018-08-05 17:26:14 -03:00
Ursprung 9b42094273
Commit 3bdf81158a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -596,9 +596,13 @@ public class InventoryPackets {
case "wdl:request": case "wdl:request":
return "WDL|REQUEST"; return "WDL|REQUEST";
default: default:
return newId.startsWith("viaversion:legacy/") return newId.startsWith("viaversion:legacy/") // Our format :)
? new String(BaseEncoding.base32().lowerCase().withPadChar('-').decode( ? new String(BaseEncoding.base32().lowerCase().withPadChar('-').decode(
newId.substring(18)), StandardCharsets.UTF_8) newId.substring(18)), StandardCharsets.UTF_8)
: newId.startsWith("legacy:")
? newId.substring(7) // Rewrite BungeeCord's format. It will only prevent kicks, plugins will still be broken because of case-sensitivity *plays sad violin*
: newId.startsWith("bungeecord:legacy/")
? newId.substring(18)
: newId; : newId;
} }
} }