DynmapCitizens/src/main/java/net/knarcraft/dynmapcitizens/UpdateRate.java

39 lines
778 B
Java

package net.knarcraft.dynmapcitizens;
/**
* An update rate for a group of icons
*/
public enum UpdateRate {
/**
* This is run quite often, to display movement
*/
FAST(5),
/**
* This is run rarely, as change isn't expected
*/
VERY_SLOW(120);
private final int everyNSeconds;
/**
* Instantiates a new update rate
*
* @param everyNSeconds <p>The number of seconds to wait between each run</p>
*/
UpdateRate(int everyNSeconds) {
this.everyNSeconds = everyNSeconds;
}
/**
* Gets the number of seconds between each time an update should be performed
*
* @return <p>The N in every N seconds</p>
*/
public int getEveryNSeconds() {
return everyNSeconds;
}
}