From dc3e7e953b187ae661280fe64ae4d9a180edf114 Mon Sep 17 00:00:00 2001 From: mrlolethan Date: Wed, 7 Jan 2015 18:29:42 -0330 Subject: [PATCH] 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" --- src/main/java/com/massivecraft/factions/cmd/CmdKick.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdKick.java b/src/main/java/com/massivecraft/factions/cmd/CmdKick.java index b21bc609..b56efe5a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdKick.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdKick.java @@ -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)) {