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")); }