From 980c09d4332df79eadcabfc513be0cf7134bf25e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 17 Jul 2024 08:04:14 +0200 Subject: [PATCH] Hotfix Badlion to disconnect every person --- src/de/steamwar/messages/BungeeCore.properties | 1 + src/de/steamwar/messages/BungeeCore_de.properties | 1 + src/de/steamwar/velocitycore/mods/Badlion.java | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 5983f53..d03aba4 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -112,6 +112,7 @@ USAGE_ALERT=§8/§7alert §8[§emessage§8] USAGE_IGNORE=§8/§7ignore §8[§eplayer§8] #ModListener +CLIENT_DISALLOWED=Attempted use of client {0} MOD_RED_SING=Attempted use of mod {0} MOD_RED_PLUR=Attempted use of mods:\n{0} MOD_YELLOW_SING=§7Deactivate the mod §e{0}§7 to continue playing on §eSteam§8War§7. diff --git a/src/de/steamwar/messages/BungeeCore_de.properties b/src/de/steamwar/messages/BungeeCore_de.properties index 8d4ddca..815048c 100644 --- a/src/de/steamwar/messages/BungeeCore_de.properties +++ b/src/de/steamwar/messages/BungeeCore_de.properties @@ -97,6 +97,7 @@ USAGE_ALERT=§8/§7alert §8[§eNachricht§8] USAGE_IGNORE=§8/§7ignore §8[§eSpieler§8] #ModListener +CLIENT_DISALLOWED=Versuchte Benutzung des Clients {0} MOD_RED_SING=Versuchte Benutzung des Mods {0} MOD_RED_PLUR=Versuchte Benutzung der Mods:\n{0} MOD_YELLOW_SING=§7Deaktiviere den Mod §e{0}§7, um weiter auf §eSteam§8War §7spielen zu können. diff --git a/src/de/steamwar/velocitycore/mods/Badlion.java b/src/de/steamwar/velocitycore/mods/Badlion.java index 74c18eb..113697e 100644 --- a/src/de/steamwar/velocitycore/mods/Badlion.java +++ b/src/de/steamwar/velocitycore/mods/Badlion.java @@ -22,6 +22,7 @@ package de.steamwar.velocitycore.mods; import com.google.gson.JsonObject; import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier; +import de.steamwar.messages.Chatter; public class Badlion { // https://github.com/BadlionClient/BadlionClientModAPI @@ -50,6 +51,10 @@ public class Badlion { } public void sendRestrictions(Player player) { + // TODO: Remove when Badlion is fixed, or we fixed the Badlion packet + Chatter sender = Chatter.of(player); + player.disconnect(sender.parse("CLIENT_DISALLOWED", "Badlion")); + player.sendPluginMessage(MinecraftChannelIdentifier.from("badlion:mods"), packet); } }