diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 78f31542c..73817f645 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -187,10 +187,6 @@ public class Util throw new Exception(_("illegalDate")); } Calendar c = new GregorianCalendar(); - if (years > 10) - { - years = 10; - } if (years > 0) { c.add(Calendar.YEAR, years * (future ? 1 : -1)); @@ -219,6 +215,12 @@ public class Util { c.add(Calendar.SECOND, seconds * (future ? 1 : -1)); } + + Calendar max = new GregorianCalendar(); + max.add(Calendar.YEAR, 10); + if (c.after(max)) { + return max.getTimeInMillis(); + } return c.getTimeInMillis(); } // The player can stand inside these materials