Merge pull request 'Update some stuff' (#338) from FabricModStuff into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #338 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
c4be9f98fa
@ -42,7 +42,7 @@ 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<>();
|
public static final Map<ProxiedPlayer, Integer> checkedPlayers = new HashMap<>();
|
||||||
|
|
||||||
{
|
{
|
||||||
neededMods.add("java");
|
neededMods.add("java");
|
||||||
@ -110,9 +110,15 @@ public class Fabric extends BasicListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(Utils.handleMods(player,mods)) {
|
if(Utils.handleMods(player,mods)) {
|
||||||
if(!checkedPlayers.contains(player)) {
|
if (checkedPlayers.containsKey(player)) {
|
||||||
|
long current = checkedPlayers.get(player);
|
||||||
|
if (current != dataString.hashCode()) {
|
||||||
|
banPlayer(user, player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
Message.send("MODIFICATION_CHECK_SUCCESS", player);
|
Message.send("MODIFICATION_CHECK_SUCCESS", player);
|
||||||
checkedPlayers.add(player);
|
checkedPlayers.put(player, dataString.hashCode());
|
||||||
}
|
}
|
||||||
Storage.fabricPlayers.remove(player);
|
Storage.fabricPlayers.remove(player);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren