diff --git a/src/de/steamwar/bungeecore/listeners/mods/Fabric.java b/src/de/steamwar/bungeecore/listeners/mods/Fabric.java index 10ecd9f..ea1e2f9 100644 --- a/src/de/steamwar/bungeecore/listeners/mods/Fabric.java +++ b/src/de/steamwar/bungeecore/listeners/mods/Fabric.java @@ -48,7 +48,7 @@ public class Fabric extends BasicListener { private final Set neededMods = new HashSet<>(); - private static final Map checkedPlayers = new HashMap<>(); + public static final Map checkedPlayers = new HashMap<>(); private static final Map expectPluginMessage = new HashMap<>(); { diff --git a/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java b/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java index 286ab01..9965c3e 100644 --- a/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java +++ b/src/de/steamwar/bungeecore/listeners/mods/ModLoaderBlocker.java @@ -46,12 +46,16 @@ public class ModLoaderBlocker extends BasicListener { if(new String(e.getData()).contains("fabric")){ ProxiedPlayer p = (ProxiedPlayer) sender; - Storage.fabricPlayers.add(p); - Message.send("MODLOADER_INSTALLED", p, "Fabric"); + if (!Fabric.checkedPlayers.containsKey(p) && !Storage.fabricPlayers.contains(p)) { + Storage.fabricPlayers.add(p); + Message.send("MODLOADER_INSTALLED_FABRIC", p, "Fabric"); + } }else if(new String(e.getData()).contains("LiteLoader")) { ProxiedPlayer p = (ProxiedPlayer) sender; - Storage.fabricPlayers.add(p); - Message.send("MODLOADER_INSTALLED", p, "LiteLoader"); + if (!Storage.fabricPlayers.contains(p)) { + Storage.fabricPlayers.add(p); + Message.send("MODLOADER_INSTALLED", p, "LiteLoader"); + } } } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 8542153..e985aaa 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -14,6 +14,7 @@ DEV_UNKNOWN_SERVER=§cBitte gib einen DevServer an. #ModLoader blocker MODLOADER_INSTALLED=§7Du hast §e{0} §7installiert. Daher kannst du keinen Arenen beitreten. +MODLOADER_INSTALLED_FABRIC=§7Du hast §e{0} §7installiert. Mit dem SteamWarModSender kannst du Arenen beitreten. MODLOADER_DENIED=§cMit Fabric, Forge und LiteLoader kannst du keinen Arenen beitreten. #Help command