From 3bdf81158a55ae1e257cccd33abbeb382efb03b2 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Sun, 5 Aug 2018 17:26:14 -0300 Subject: [PATCH] Rewrite BungeeCord's plugin channel format --- .../protocol1_13to1_12_2/packets/InventoryPackets.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/InventoryPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/InventoryPackets.java index 8ab9f565e..7ddd1688b 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/InventoryPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/InventoryPackets.java @@ -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; } }