From 815b700eac9913d46ec1bd2457f0e37c791e5aa8 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 20 Jul 2011 22:14:56 +0200 Subject: Don't return offline players with getPlayer() --- Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java index bb4087c92..459e48f8f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java @@ -6,6 +6,7 @@ import org.bukkit.Server; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.OfflinePlayer; import org.bukkit.entity.Player; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; @@ -44,7 +45,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand User user = ess.getAllUsers().get(args[pos].toLowerCase()); if (user != null) { - if(!getOffline && user.isHidden()) + if(!getOffline && (user.getBase() instanceof OfflinePlayer || user.isHidden())) { throw new NoSuchFieldException(Util.i18n("playerNotFound")); } -- cgit v1.2.3