mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 19:18:29 +01:00
More fixes to /tjail
Don't prevent unjailing an admin Fix time change
This commit is contained in:
parent
6b85b306ef
commit
a65390ed98
@ -23,14 +23,14 @@ public class Commandtogglejail extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
User p = getPlayer(server, args, 0, true);
|
User p = getPlayer(server, args, 0, true);
|
||||||
|
|
||||||
|
if (args.length >= 2 && !p.isJailed())
|
||||||
|
{
|
||||||
if (p.isAuthorized("essentials.jail.exempt"))
|
if (p.isAuthorized("essentials.jail.exempt"))
|
||||||
{
|
{
|
||||||
sender.sendMessage(Util.i18n("mayNotJail"));
|
sender.sendMessage(Util.i18n("mayNotJail"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length >= 2 && !p.isJailed())
|
|
||||||
{
|
|
||||||
charge(sender);
|
charge(sender);
|
||||||
p.setJailed(true);
|
p.setJailed(true);
|
||||||
p.sendMessage(Util.i18n("userJailed"));
|
p.sendMessage(Util.i18n("userJailed"));
|
||||||
@ -64,7 +64,7 @@ public class Commandtogglejail extends EssentialsCommand
|
|||||||
return;
|
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);
|
String time = getFinalArg(args, 2);
|
||||||
long timeDiff = Util.parseDateDiff(time, true);
|
long timeDiff = Util.parseDateDiff(time, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user