Package ch.njol.skript.util
Class Time
java.lang.Object
ch.njol.skript.util.Time
- All Implemented Interfaces:
YggdrasilSerializable,Cyclical<Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.njol.yggdrasil.YggdrasilSerializable
YggdrasilSerializable.YggdrasilExtendedSerializable, YggdrasilSerializable.YggdrasilRobustEnum, YggdrasilSerializable.YggdrasilRobustSerializable -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Time
public Time() -
Time
public Time(int time)
-
-
Method Details
-
getTicks
public int getTicks()- Returns:
- Ticks in Minecraft time (0 ticks == 6:00)
-
getTime
public int getTime()- Returns:
- Ticks in day time (0 ticks == 0:00)
-
getHour
public int getHour() -
getMinute
public int getMinute() -
toString
-
toString
-
parse
- Parameters:
s- The trim()med string to parse- Returns:
- The parsed time of null if the input was invalid
-
hashCode
public int hashCode() -
equals
-
getMaximum
Description copied from interface:CyclicalThe potential 'top' of the cycle, e.g. the highest value after which this should restart. In practice, nothing forces this, so you can write 24:00 or 361° instead of 00:00 and 1° respectively.- Specified by:
getMaximumin interfaceCyclical<Integer>- Returns:
- the highest legal value
-
getMinimum
Description copied from interface:CyclicalThe potential 'bottom' of the cycle, e.g. the lowest value. In practice, nothing forces this, so 24:00 is synonymous with 00:00.- Specified by:
getMinimumin interfaceCyclical<Integer>- Returns:
- the lowest legal value
-