PandaLib/pandalib-util/src/main/java/fr/pandacube/lib/util/Tick.java

31 lines
592 B
Java
Raw Normal View History

package fr.pandacube.lib.util;
2021-03-06 16:51:53 +01:00
public class Tick {
/**
* Returns the number of tick is the provided duration, in second
* @param seconds the duration in second
* @return the same duration as provided, but in Minecraft server ticks
*/
public static long sec(long seconds) {
return seconds * 20;
}
/**
* Returns the number of tick is the provided duration, in second
* @param minutes the duration in minutes
2021-03-06 16:51:53 +01:00
* @return the same duration as provided, but in Minecraft server ticks
*/
public static long min(long minutes) {
return minutes * 1200;
}
}