From 5b4cb4fc108c07dc6a1376bce4ac02a4b1d3a0ee Mon Sep 17 00:00:00 2001 From: BuildTools Date: Wed, 8 Jul 2020 16:30:44 +0200 Subject: [PATCH] /r included --- .../steamwar/bungeecore/commands/RCommand.java | 6 +++++- .../bungeecore/commands/UnIgnoreCommand.java | 16 ++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/RCommand.java b/src/de/steamwar/bungeecore/commands/RCommand.java index 2ff68d27..e2136d5e 100644 --- a/src/de/steamwar/bungeecore/commands/RCommand.java +++ b/src/de/steamwar/bungeecore/commands/RCommand.java @@ -1,6 +1,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.connection.ProxiedPlayer; @@ -31,7 +32,10 @@ public class RCommand extends BasicCommand { BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu hast bisher mit niemandem geschrieben!"); return; } - + if (IgnoreSystem.isIgnored(target.getUniqueId(), player.getUniqueId())) { + BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler hat dich geblockt!"); + return; + } if(!target.isConnected()){ BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!"); return; diff --git a/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java b/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java index 3191c00f..b1722031 100644 --- a/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java +++ b/src/de/steamwar/bungeecore/commands/UnIgnoreCommand.java @@ -16,14 +16,14 @@ public class UnIgnoreCommand extends BasicCommand { public void execute(CommandSender s, String[] args) { if (!(s instanceof ProxiedPlayer)) return; ProxiedPlayer p = (ProxiedPlayer) s; - 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.getUuid()); - BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du beachtest nun " + target.getUserName() + " wieder."); - } + SteamwarUser t = SteamwarUser.get(args[0]); + if(t == null){ + BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§cDieser Spieler ist derzeit nicht online!"); + return; + }else { + IgnoreSystem.unIgnore(p.getUniqueId(), t.getUuid()); + BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du beachtest nun " + t.getUserName() + " wieder."); + } } } \ No newline at end of file