mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-17 20:11:21 +02:00
Merge pull request #229 from necrodoom/patch-9
fix tempban permission check
This commit is contained in:
@@ -47,7 +47,7 @@ public class Commandtempban extends EssentialsCommand
|
||||
final long banTimestamp = Util.parseDateDiff(time, true);
|
||||
|
||||
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"));
|
||||
throw new NoChargeException();
|
||||
|
Reference in New Issue
Block a user