From bfd0b11e47df69bbe983f5aeafd0aba06f3e32d4 Mon Sep 17 00:00:00 2001 From: Jan9103 Date: Thu, 25 Jun 2020 11:46:43 +0200 Subject: [PATCH] Steamwar-User statt Proxied Player --- src/de/steamwar/bungeecore/commands/IgnoreCommand.java | 9 +++++---- src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/IgnoreCommand.java b/src/de/steamwar/bungeecore/commands/IgnoreCommand.java index 328cd4ab..f9d2b8c3 100644 --- a/src/de/steamwar/bungeecore/commands/IgnoreCommand.java +++ b/src/de/steamwar/bungeecore/commands/IgnoreCommand.java @@ -2,6 +2,7 @@ package de.steamwar.bungeecore.commands; import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.sql.IgnoreSystem; +import de.steamwar.bungeecore.sql.SteamwarUser; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -16,16 +17,16 @@ public class IgnoreCommand extends BasicCommand { public void execute(CommandSender s, String[] args) { if (!(s instanceof ProxiedPlayer)) return; ProxiedPlayer p = (ProxiedPlayer) s; - ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]); + SteamwarUser target = SteamwarUser.get(args[0]); if(target == null){ - BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!"); + BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDieser Spieler wurde nicht in der Datenbank gefunden!"); return; }else if(target.equals(p)){ BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cWie willst du dich selber ignorieren?"); return; }else { - IgnoreSystem.ignore(p.getUniqueId(), target.getUniqueId()); - BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du ignorierst nun " + target.getDisplayName() + "."); + IgnoreSystem.ignore(p.getUniqueId(), target.getUuid()); + BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du ignorierst nun " + target.getUserName() + "."); } } diff --git a/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java b/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java index 3ed130c0..c75f27e4 100644 --- a/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java +++ b/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java @@ -2,8 +2,8 @@ package de.steamwar.bungeecore.commands; import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.sql.IgnoreSystem; +import de.steamwar.bungeecore.sql.SteamwarUser; import net.md_5.bungee.api.CommandSender; -import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.connection.ProxiedPlayer; public class UnIgnoreCommand extends BasicCommand { @@ -16,13 +16,13 @@ public class UnIgnoreCommand extends BasicCommand { public void execute(CommandSender s, String[] args) { if (!(s instanceof ProxiedPlayer)) return; ProxiedPlayer p = (ProxiedPlayer) s; - ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]); + SteamwarUser target = SteamwarUser.get(args[0]); if(target == null){ BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!"); return; }else { - IgnoreSystem.unIgnore(p.getUniqueId(), target.getUniqueId()); - BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du beachtest nun " + target.getDisplayName() + " wieder."); + IgnoreSystem.unIgnore(p.getUniqueId(), target.getUuid()); + BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du beachtest nun " + target.getUserName() + " wieder."); } }