Add Check if user is Banned in Unban Command
Dieser Commit ist enthalten in:
Ursprung
df5b40020a
Commit
42adba4adc
@ -22,7 +22,6 @@ package de.steamwar.bungeecore.commands;
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
@ -44,6 +43,11 @@ public class UnbanCommand extends BasicCommand {
|
||||
if(target == null)
|
||||
return;
|
||||
|
||||
if(!target.isBanned()) {
|
||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "Der Spieler ist nicht gebannt.");
|
||||
return;
|
||||
}
|
||||
|
||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "Du hast " + target.getUserName() + " entbannt.");
|
||||
target.ban(Timestamp.from(new Date().toInstant()), "Unban", SteamwarUser.get(sender.getName()).getId(), false);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren