1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 18:14:38 +02:00

Another fix for /tjail offline players

This commit is contained in:
snowleo
2011-07-19 00:59:43 +02:00
parent fdbb6510ef
commit 6b85b306ef

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)