Dieser Commit ist enthalten in:
Ursprung
657c03dff1
Commit
c239dc7809
@ -23,11 +23,13 @@ import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Storage;
|
||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
||||
import de.steamwar.bungeecore.sql.Mod;
|
||||
import de.steamwar.bungeecore.sql.Punishment;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
|
||||
@ -40,6 +42,7 @@ import java.util.logging.Level;
|
||||
public class Fabric extends BasicListener {
|
||||
|
||||
private final List<String> neededMods = new LinkedList<>();
|
||||
public static final Set<ProxiedPlayer> checkedPlayers = new HashSet();
|
||||
|
||||
{
|
||||
neededMods.add("java");
|
||||
@ -91,13 +94,18 @@ public class Fabric extends BasicListener {
|
||||
return;
|
||||
}
|
||||
|
||||
Utils.handleMods(player,mods);
|
||||
if(Utils.handleMods(player,mods)) checkedPlayers.add(player);
|
||||
}catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
player.disconnect("§7Mod Verification failed! Contact a Developer");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onDisconnect(PlayerDisconnectEvent e){
|
||||
checkedPlayers.remove(e.getPlayer());
|
||||
}
|
||||
|
||||
private boolean isSortedAlphabetically(List<Mod> mods) {
|
||||
boolean isSorted = true;
|
||||
for(int i = 0; i < mods.size() - 1; i++) {
|
||||
|
@ -73,7 +73,7 @@ public class ModLoaderBlocker extends BasicListener {
|
||||
}
|
||||
|
||||
public static boolean isFabric(ProxiedPlayer player) {
|
||||
return Storage.fabricPlayers.contains(player);
|
||||
return Storage.fabricPlayers.contains(player) && !Fabric.checkedPlayers.contains(player);
|
||||
}
|
||||
|
||||
public static void addServer(String server) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren