From d46c89101d3bb4ee6711d00313e48072fe3a4a36 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 24 Oct 2023 11:37:36 +0200 Subject: [PATCH] Fix ModLoaderBlocker for Legacy API, if still used? --- .../bungeecore/listeners/mods/ModLoaderBlocker.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java b/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java index d363ec62..4a17b00f 100644 --- a/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java +++ b/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java @@ -41,11 +41,16 @@ public class ModLoaderBlocker extends BasicListener { if(!(sender instanceof ProxiedPlayer)) return; + ProxiedPlayer p = (ProxiedPlayer) sender; + if (e.getTag().equals("lunarclient:pm")) { + p.disconnect(Message.parseToComponent("MOD_LOADER_LUNAR_CLIENT", false, p)); + return; + } + if(!e.getTag().equals("minecraft:brand")) return; String brand = new String(e.getData()); - ProxiedPlayer p = (ProxiedPlayer) sender; if(brand.contains("fabric") || brand.contains("quilt") || brand.contains("LiteLoader")){ if (!Storage.fabricCheckedPlayers.containsKey(p)) { Storage.fabricPlayers.add(p);