SteamWar/BungeeCore
Archiviert
13
2

Update GDPRQuery
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-06-14 21:49:20 +02:00
Ursprung 8823368f0d
Commit 99f5fbc3b8

Datei anzeigen

@ -4,6 +4,7 @@ import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Message; import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.sql.Statement; import de.steamwar.bungeecore.sql.Statement;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
import de.steamwar.command.SWCommand;
import net.md_5.bungee.BungeeCord; import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -12,19 +13,20 @@ import java.io.*;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
public class GDPRQuery extends BasicCommand { public class GDPRQuery extends SWCommand {
public GDPRQuery() { public GDPRQuery() {
super("gdprquery", "bungeecore.softreload"); super("gdprquery", "bungeecore.softreload");
} }
@Override @Register
public void execute(CommandSender sender, String[] args) { public void generate(ProxiedPlayer player) {
if(!(sender instanceof ProxiedPlayer)) generate(player, player);
return; }
ProxiedPlayer player = (ProxiedPlayer) sender; @Register
SteamwarUser user = args.length == 0 ? SteamwarUser.get(player.getUniqueId()) : SteamwarUser.get(args[0]); public void generate(ProxiedPlayer player, ProxiedPlayer forPlayer) {
SteamwarUser user = SteamwarUser.get(forPlayer);
if(user == null) { if(user == null) {
Message.send("UNKNOWN_PLAYER", player); Message.send("UNKNOWN_PLAYER", player);
return; return;