Fix "No player found" message in CmdKick
When `/f kick` was used with zero arguments, an ugly message was sent to the player regarding a missing player match for "null"
This commit is contained in:
parent
8103f953eb
commit
dc3e7e953b
@ -32,7 +32,7 @@ public class CmdKick extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
FPlayer toKick = this.argAsBestFPlayerMatch(0);
|
||||
FPlayer toKick = this.argIsSet(0) ? this.argAsBestFPlayerMatch(0) : null;
|
||||
if (toKick == null) {
|
||||
FancyMessage msg = new FancyMessage(TL.COMMAND_KICK_CANDIDATES.toString()).color(ChatColor.GOLD);
|
||||
for (FPlayer player : myFaction.getFPlayersWhereRole(Role.NORMAL)) {
|
||||
|
Loading…
Reference in New Issue
Block a user