diff --git a/pom.xml b/pom.xml index c32fc5f0..2728a300 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ LibsDisguises LibsDisguises - 10.0.9 + 10.0.9-SNAPSHOT exec:java clean install diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerChannelRegister.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerChannelRegister.java index 506a624f..79002e2f 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerChannelRegister.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerChannelRegister.java @@ -6,6 +6,7 @@ import com.comphenix.protocol.events.PacketAdapter; import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.events.PacketEvent; import me.libraryaddict.disguise.LibsDisguises; +import me.libraryaddict.disguise.utilities.reflection.NmsVersion; import org.bukkit.entity.Player; import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.scheduler.BukkitRunnable; @@ -23,8 +24,14 @@ public class PacketListenerChannelRegister extends PacketAdapter { @Override public void onPacketReceiving(PacketEvent event) { - if (!event.getPacket().getMinecraftKeys().read(0).getFullKey().equals("minecraft:brand")) { - return; + if (NmsVersion.v1_13.isSupported()) { + if (!event.getPacket().getMinecraftKeys().read(0).getFullKey().equals("minecraft:brand")) { + return; + } + } else { + if (!event.getPacket().getStrings().read(0).equals("MC|Brand")) { + return; + } } new BukkitRunnable() {