mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-22 01:32:17 +00:00
Fix duration parser handling of weeks, months & years (#1905)
This commit is contained in:
1 file changed
+3
-1
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user