summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorementalo <suror@gmx.co.uk>2011-07-18 22:49:27 +0100
committerementalo <suror@gmx.co.uk>2011-07-18 22:49:27 +0100
commit15687c20d0ef0421b976f08453ccf8f4b01da0b4 (patch)
tree015f01c7cb236b82b006a6d72ad8acb85d82ab33
parent81cc5b1f28345640c20a762783af294ebd4da7e7 (diff)
downloadEssentials-15687c20d0ef0421b976f08453ccf8f4b01da0b4.tar
Essentials-15687c20d0ef0421b976f08453ccf8f4b01da0b4.tar.gz
Essentials-15687c20d0ef0421b976f08453ccf8f4b01da0b4.tar.lz
Essentials-15687c20d0ef0421b976f08453ccf8f4b01da0b4.tar.xz
Essentials-15687c20d0ef0421b976f08453ccf8f4b01da0b4.zip
only check hidden if !offline, compare user with offlineplayer class
-rw-r--r--Essentials/src/com/earth2me/essentials/Jail.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java2
3 files changed, 4 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Jail.java b/Essentials/src/com/earth2me/essentials/Jail.java
index f867a68fd..fdc184055 100644
--- a/Essentials/src/com/earth2me/essentials/Jail.java
+++ b/Essentials/src/com/earth2me/essentials/Jail.java
@@ -42,7 +42,7 @@ public class Jail extends BlockListener implements IConf
public void sendToJail(User user, String jail) throws Exception
{
- if (user.getLastActivity() > 0)
+ if (!(user.getBase() instanceof OfflinePlayer))
{
user.getTeleport().now(getJail(jail));
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
index c994cabaa..4f199e472 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
@@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.User;
@@ -74,7 +75,7 @@ public class Commandtogglejail extends EssentialsCommand
p.setJailTimeout(0);
p.sendMessage("ยง7You have been released");
p.setJail(null);
- if (p.getLastActivity() > 0)
+ if (!(p.getBase() instanceof OfflinePlayer))
{
p.getTeleport().back();
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
index 23f0b5014..663895ff7 100644
--- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
+++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
@@ -44,7 +44,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
User user = ess.getAllUsers().get(args[pos]);
if (user != null)
{
- if(user.isHidden())
+ if(!getOffline && user.isHidden())
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}