Archiviert
1
0

Merge pull request 'Update GDPRQuery' (#382) from CommandGDPRQuery into master

Reviewed-on: SteamWar/BungeeCore#382
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-16 13:10:27 +02:00
Commit 5bfac6c7b5

Datei anzeigen

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