Class GMTimes
java.lang.Object
com.djrapitops.plan.gathering.domain.TimeKeeper
com.djrapitops.plan.gathering.domain.GMTimes
TimeKeeper class that tracks the time spent in each GameMode based on Playtime.
-
Field Summary
Fields inherited from class com.djrapitops.plan.gathering.domain.TimeKeeper
lastStateChange, state, times
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
getState()
static String
magicNumberToGMName
(int magicNumber) void
resetTimes
(long time) void
setAllGMTimes
(long... times) Sets times for all 4 gamemodes.toJson()
toString()
Methods inherited from class com.djrapitops.plan.gathering.domain.TimeKeeper
addTime, changeState, equals, getLastStateChange, getTime, getTimes, getTotal, hashCode, renameState, resetState, resetState, setLastStateChange, setState, setTime, setTimes
-
Constructor Details
-
GMTimes
-
GMTimes
-
GMTimes
-
GMTimes
-
GMTimes
public GMTimes()
-
-
Method Details
-
getGMKeyArray
-
magicNumberToGMName
-
getMostUsedGameMode
-
setAllGMTimes
public void setAllGMTimes(long... times) Sets times for all 4 gamemodes.Give 1 - 4 parameters. times starts from Survival, ends in Spectator.
Given too few parameters (Under 4, rest are set as 0L) Extra parameters are ignored (Over 4)
- Parameters:
times
- 1-4 time parameters.- Throws:
IllegalArgumentException
- If any parameter is null.
-
resetTimes
public void resetTimes(long time) -
getState
- Overrides:
getState
in classTimeKeeper
-
toString
- Overrides:
toString
in classTimeKeeper
-
toJson
-