mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 11:07:55 +01:00
only check hidden if !offline, compare user with offlineplayer class
This commit is contained in:
parent
81cc5b1f28
commit
15687c20d0
@ -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));
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user