Merge pull request 'Update GDPRQuery' (#382) from CommandGDPRQuery into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #382 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
5bfac6c7b5
@ -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;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren