From 99f5fbc3b87cbdc399afe17d7745863ba2e66410 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 14 Jun 2022 21:49:20 +0200 Subject: [PATCH] Update GDPRQuery --- .../steamwar/bungeecore/commands/GDPRQuery.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/GDPRQuery.java b/src/de/steamwar/bungeecore/commands/GDPRQuery.java index 444a22c..671d5a2 100644 --- a/src/de/steamwar/bungeecore/commands/GDPRQuery.java +++ b/src/de/steamwar/bungeecore/commands/GDPRQuery.java @@ -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; -- 2.39.5