diff options
author | snowleo <schneeleo@gmail.com> | 2011-07-20 22:14:56 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-07-20 22:14:56 +0200 |
commit | 815b700eac9913d46ec1bd2457f0e37c791e5aa8 (patch) | |
tree | 477b02f71122d49df37f4019749f660be268a501 | |
parent | fcda9f9d3b1d928c55a1059915f7500d80246d5d (diff) | |
download | Essentials-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.java | 3 |
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")); } |