Merge pull request 'Improve needed mods check' (#456) from BetterNeededMods into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #456 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
e26ee5f389
@ -122,12 +122,8 @@ public class Fabric extends BasicListener {
|
|||||||
mods.add(Mod.getOrCreate(mod.getAsString(), Mod.Platform.FABRIC));
|
mods.add(Mod.getOrCreate(mod.getAsString(), Mod.Platform.FABRIC));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!neededModsContained(mods)) {
|
boolean neededMods = neededModsContained(mods);
|
||||||
logMessage(user, "Needed mods are not contained", dataString);
|
if(Utils.handleMods(player,mods) && neededMods) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Utils.handleMods(player,mods)) {
|
|
||||||
if (Storage.fabricCheckedPlayers.containsKey(player)) {
|
if (Storage.fabricCheckedPlayers.containsKey(player)) {
|
||||||
long current = Storage.fabricCheckedPlayers.get(player);
|
long current = Storage.fabricCheckedPlayers.get(player);
|
||||||
if (current != dataString.hashCode()) {
|
if (current != dataString.hashCode()) {
|
||||||
@ -139,6 +135,8 @@ public class Fabric extends BasicListener {
|
|||||||
Storage.fabricCheckedPlayers.put(player, dataString.hashCode());
|
Storage.fabricCheckedPlayers.put(player, dataString.hashCode());
|
||||||
}
|
}
|
||||||
Storage.fabricPlayers.remove(player);
|
Storage.fabricPlayers.remove(player);
|
||||||
|
} else if (!neededMods) {
|
||||||
|
logMessage(user, "Needed mods are not contained", dataString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren