1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-10-01 16:46:51 +02:00

Another fix for /tjail offline players

This commit is contained in:
snowleo
2011-07-19 00:59:43 +02:00
parent 4a0afb9dd8
commit 3d0da9df93

View File

@@ -35,7 +35,15 @@ public class Commandtogglejail extends EssentialsCommand
p.setJailed(true);
p.sendMessage(Util.i18n("userJailed"));
p.setJail(null);
ess.getJail().sendToJail(p, args[1]);
if (!(p.getBase() instanceof OfflinePlayer))
{
ess.getJail().sendToJail(p, args[1]);
}
else
{
// Check if jail exists
ess.getJail().getJail(args[1]);
}
p.setJail(args[1]);
long timeDiff = 0;
if (args.length > 2)