From 3f9f9546f6a687b6c7302d07e2e70f7359b3237e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 17 Feb 2023 14:51:03 +0100 Subject: [PATCH] Improve needed mods check --- src/de/steamwar/bungeecore/listeners/mods/Fabric.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/de/steamwar/bungeecore/listeners/mods/Fabric.java b/src/de/steamwar/bungeecore/listeners/mods/Fabric.java index 440ab121..24b48045 100644 --- a/src/de/steamwar/bungeecore/listeners/mods/Fabric.java +++ b/src/de/steamwar/bungeecore/listeners/mods/Fabric.java @@ -122,12 +122,8 @@ public class Fabric extends BasicListener { mods.add(Mod.get(mod.getAsString(), Mod.Platform.FABRIC)); } - if(!neededModsContained(mods)) { - logMessage(user, "Needed mods are not contained", dataString); - return; - } - - if(Utils.handleMods(player,mods)) { + boolean neededMods = neededModsContained(mods); + if(Utils.handleMods(player,mods) && neededMods) { if (Storage.fabricCheckedPlayers.containsKey(player)) { long current = Storage.fabricCheckedPlayers.get(player); if (current != dataString.hashCode()) { @@ -139,6 +135,8 @@ public class Fabric extends BasicListener { Storage.fabricCheckedPlayers.put(player, dataString.hashCode()); } Storage.fabricPlayers.remove(player); + } else if (!neededMods) { + logMessage(user, "Needed mods are not contained", dataString); } }