Rewrite BungeeCord's plugin channel format

This commit is contained in:
creeper123123321 2018-08-05 17:26:14 -03:00
parent 9b42094273
commit 3bdf81158a
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1

View File

@ -596,9 +596,13 @@ public class InventoryPackets {
case "wdl:request":
return "WDL|REQUEST";
default:
return newId.startsWith("viaversion:legacy/")
return newId.startsWith("viaversion:legacy/") // Our format :)
? new String(BaseEncoding.base32().lowerCase().withPadChar('-').decode(
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;
}
}