Steamwar-User statt Proxied Player
Dieser Commit ist enthalten in:
Ursprung
d9efeefd2b
Commit
bfd0b11e47
@ -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() + ".");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren