mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-03 17:39:31 +01:00
Fix duration parser handling of weeks, months & years (#1905)
This commit is contained in:
parent
83883aa7e6
commit
a33f326cfc
@ -73,7 +73,9 @@ public final class DurationParser {
|
||||
|
||||
if (matcher.group(g) != null && !matcher.group(g).isEmpty()) {
|
||||
int n = Integer.parseInt(matcher.group(g));
|
||||
duration = duration.plus(n, unit);
|
||||
if (n > 0) {
|
||||
duration = duration.plus(unit.getDuration().multipliedBy(n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user