diff options
author | snowleo <schneeleo@gmail.com> | 2011-07-19 00:59:43 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-07-19 00:59:43 +0200 |
commit | 6b85b306efbeeaf136e272bea971d35ff0b02520 (patch) | |
tree | 617906d4d5575ce3e854c00e2a69a524caafe300 | |
parent | fdbb6510ef064e5c25bcf86f031a1cd1c61078a3 (diff) | |
download | Essentials-6b85b306efbeeaf136e272bea971d35ff0b02520.tar Essentials-6b85b306efbeeaf136e272bea971d35ff0b02520.tar.gz Essentials-6b85b306efbeeaf136e272bea971d35ff0b02520.tar.lz Essentials-6b85b306efbeeaf136e272bea971d35ff0b02520.tar.xz Essentials-6b85b306efbeeaf136e272bea971d35ff0b02520.zip |
Another fix for /tjail offline players
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java index 4f199e472..ccb1e6781 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java @@ -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) |