Archiviert
1
0

Merge pull request 'Remove Redundant Message when switching Servers' (#337) from FabricModSender into master

Reviewed-on: SteamWar/BungeeCore#337
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2022-04-05 18:39:03 +02:00
Commit 1119856693
2 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -42,6 +42,8 @@ public class Fabric extends BasicListener {
private final Set<String> neededMods = new HashSet<>(); private final Set<String> neededMods = new HashSet<>();
public static final Set<ProxiedPlayer> checkedPlayers = new HashSet<>();
{ {
neededMods.add("java"); neededMods.add("java");
neededMods.add("minecraft"); neededMods.add("minecraft");
@ -108,8 +110,11 @@ public class Fabric extends BasicListener {
} }
if(Utils.handleMods(player,mods)) { if(Utils.handleMods(player,mods)) {
Storage.fabricPlayers.remove(player); if(!checkedPlayers.contains(player)) {
Message.send("MODIFICATION_CHECK_SUCCESS", player); Message.send("MODIFICATION_CHECK_SUCCESS", player);
checkedPlayers.add(player);
}
Storage.fabricPlayers.remove(player);
} }
} }

Datei anzeigen

@ -58,6 +58,7 @@ public class ModLoaderBlocker extends BasicListener {
@EventHandler @EventHandler
public void onDisconnect(PlayerDisconnectEvent e){ public void onDisconnect(PlayerDisconnectEvent e){
Fabric.checkedPlayers.remove(e.getPlayer());
Storage.fabricPlayers.remove(e.getPlayer()); Storage.fabricPlayers.remove(e.getPlayer());
} }