mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-19 09:06:09 +01:00
Fix null when trying to tempban players in console for times longer than max ban.
This commit is contained in:
parent
5e6f6b2482
commit
274ad06665
@ -46,7 +46,8 @@ 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)
|
||||
&& sender instanceof Player && !(ess.getUser(sender).isAuthorized("essentials.tempban.unlimited")))
|
||||
{
|
||||
sender.sendMessage(_("oversizedTempban"));
|
||||
throw new NoChargeException();
|
||||
|
Loading…
Reference in New Issue
Block a user