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
commitfa2fa54fe2b35022d6e2846e6307e85a323a4626 (patch)
tree7418630e58fbd113ff5f78fd500310e95e76cb00
parente8ff59b9aa329b69fb279e2eff1a49818ac66f84 (diff)
downloadEssentials-fa2fa54fe2b35022d6e2846e6307e85a323a4626.tar
Essentials-fa2fa54fe2b35022d6e2846e6307e85a323a4626.tar.gz
Essentials-fa2fa54fe2b35022d6e2846e6307e85a323a4626.tar.lz
Essentials-fa2fa54fe2b35022d6e2846e6307e85a323a4626.tar.xz
Essentials-fa2fa54fe2b35022d6e2846e6307e85a323a4626.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"));
}