mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 02:58:03 +01:00
Merge pull request #229 from necrodoom/patch-9
fix tempban permission check
This commit is contained in:
commit
52b104aca5
@ -47,7 +47,7 @@ public class Commandtempban extends EssentialsCommand
|
|||||||
final long banTimestamp = Util.parseDateDiff(time, true);
|
final long banTimestamp = Util.parseDateDiff(time, true);
|
||||||
|
|
||||||
final long maxBanLength = ess.getSettings().getMaxTempban() * 1000;
|
final long maxBanLength = ess.getSettings().getMaxTempban() * 1000;
|
||||||
if(maxBanLength > 0 && ((banTimestamp - GregorianCalendar.getInstance().getTimeInMillis()) > maxBanLength) && ess.getUser(sender).isAuthorized("essentials.tempban.unlimited"))
|
if(maxBanLength > 0 && ((banTimestamp - GregorianCalendar.getInstance().getTimeInMillis()) > maxBanLength) && !(ess.getUser(sender).isAuthorized("essentials.tempban.unlimited")))
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("oversizedTempban"));
|
sender.sendMessage(_("oversizedTempban"));
|
||||||
throw new NoChargeException();
|
throw new NoChargeException();
|
||||||
|
Loading…
Reference in New Issue
Block a user