diff --git a/src/main/java/dev/zontreck/ariaslib/util/Percent.java b/src/main/java/dev/zontreck/ariaslib/util/Percent.java index da4b2ab..3b51a2b 100644 --- a/src/main/java/dev/zontreck/ariaslib/util/Percent.java +++ b/src/main/java/dev/zontreck/ariaslib/util/Percent.java @@ -2,7 +2,6 @@ package dev.zontreck.ariaslib.util; import java.io.PrintStream; -@Deprecated public class Percent { int current; diff --git a/src/main/java/dev/zontreck/ariaslib/util/TimeUtil.java b/src/main/java/dev/zontreck/ariaslib/util/TimeUtil.java index 33991c8..b1f8d28 100644 --- a/src/main/java/dev/zontreck/ariaslib/util/TimeUtil.java +++ b/src/main/java/dev/zontreck/ariaslib/util/TimeUtil.java @@ -55,6 +55,21 @@ public class TimeUtil return new TimeNotation(years, month, week, day, hour, minute, seconds); } + public static int notationToSeconds(TimeNotation notation) + { + int seconds = 0; + + seconds += (notation.Years * YEAR); + seconds += (notation.Months * MONTH); + seconds += (notation.Weeks * WEEK); + seconds += (notation.Days * DAY); + seconds += (notation.Hours * HOUR); + seconds += (notation.Minutes * MINUTE); + seconds += (notation.Seconds); + + return seconds; + } + public static final int SECOND; public static final int MINUTE;