Merge pull request 'Remove Redundant Message when switching Servers' (#337) from FabricModSender into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #337 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
1119856693
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren