summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-19 01:12:19 +0200
committersnowleo <schneeleo@gmail.com>2011-07-19 01:12:19 +0200
commita65390ed98986028feeb44a566a76086736e35cb (patch)
tree2b7b2a74af485cd3ef76d9776aec1a832eed20e2
parent6b85b306efbeeaf136e272bea971d35ff0b02520 (diff)
downloadEssentials-a65390ed98986028feeb44a566a76086736e35cb.tar
Essentials-a65390ed98986028feeb44a566a76086736e35cb.tar.gz
Essentials-a65390ed98986028feeb44a566a76086736e35cb.tar.lz
Essentials-a65390ed98986028feeb44a566a76086736e35cb.tar.xz
Essentials-a65390ed98986028feeb44a566a76086736e35cb.zip
More fixes to /tjail
Don't prevent unjailing an admin Fix time change
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
index ccb1e6781..8e5480e74 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java
@@ -23,14 +23,14 @@ public class Commandtogglejail extends EssentialsCommand
}
User p = getPlayer(server, args, 0, true);
- if (p.isAuthorized("essentials.jail.exempt"))
- {
- sender.sendMessage(Util.i18n("mayNotJail"));
- return;
- }
if (args.length >= 2 && !p.isJailed())
{
+ if (p.isAuthorized("essentials.jail.exempt"))
+ {
+ sender.sendMessage(Util.i18n("mayNotJail"));
+ return;
+ }
charge(sender);
p.setJailed(true);
p.sendMessage(Util.i18n("userJailed"));
@@ -64,7 +64,7 @@ public class Commandtogglejail extends EssentialsCommand
return;
}
- if (args.length >= 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.getJail()))
+ if (args.length >= 2 && p.isJailed() && args[1].equalsIgnoreCase(p.getJail()))
{
String time = getFinalArg(args, 2);
long timeDiff = Util.parseDateDiff(time, true);