From 2fcd3904dc5aab0dfdedb5c928f4b32ddf543f5e Mon Sep 17 00:00:00 2001 From: riking Date: Mon, 28 Oct 2013 13:20:26 -0700 Subject: [PATCH] In Kraken command, use getPlayer(name, true) and a null-check --- .../java/com/gmail/nossr50/commands/KrakenCommand.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/KrakenCommand.java b/src/main/java/com/gmail/nossr50/commands/KrakenCommand.java index f24ddf910..7ca6defdc 100644 --- a/src/main/java/com/gmail/nossr50/commands/KrakenCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/KrakenCommand.java @@ -11,11 +11,10 @@ import org.bukkit.entity.Player; import org.bukkit.util.StringUtil; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.gmail.nossr50.util.Misc; +import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.player.UserManager; - import com.google.common.collect.ImmutableList; public class KrakenCommand implements TabExecutor { @@ -41,10 +40,10 @@ public class KrakenCommand implements TabExecutor { return true; } - String playerName = Misc.getMatchedPlayerName(args[0]); - McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName); + McMMOPlayer mcMMOPlayer = UserManager.getPlayer(args[0], true); - if (!CommandUtils.checkPlayerExistence(sender, playerName, mcMMOPlayer)) { + if (mcMMOPlayer == null) { + sender.sendMessage(LocaleLoader.getString("Commands.Offline")); return true; }