summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-20 22:14:56 +0200
committersnowleo <schneeleo@gmail.com>2011-07-20 22:14:56 +0200
commit815b700eac9913d46ec1bd2457f0e37c791e5aa8 (patch)
tree477b02f71122d49df37f4019749f660be268a501
parentfcda9f9d3b1d928c55a1059915f7500d80246d5d (diff)
downloadEssentials-815b700eac9913d46ec1bd2457f0e37c791e5aa8.tar
Essentials-815b700eac9913d46ec1bd2457f0e37c791e5aa8.tar.gz
Essentials-815b700eac9913d46ec1bd2457f0e37c791e5aa8.tar.lz
Essentials-815b700eac9913d46ec1bd2457f0e37c791e5aa8.tar.xz
Essentials-815b700eac9913d46ec1bd2457f0e37c791e5aa8.zip
Don't return offline players with getPlayer()
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java3
1 files changed, 2 insertions, 1 deletions
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"));
}