diff --git a/src/de/steamwar/bungeecore/commands/IgnoreCommand.java b/src/de/steamwar/bungeecore/commands/IgnoreCommand.java index 328cd4a..f9d2b8c 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 3ed130c..c75f27e 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."); } }