Class GMTimes


  • public class GMTimes
    extends TimeKeeper
    TimeKeeper class that tracks the time spent in each GameMode based on Playtime.
    • Constructor Detail

      • GMTimes

        public GMTimes​(java.util.Map<java.lang.String,​java.lang.Long> times,
                       java.lang.String lastState,
                       long lastStateChange)
      • GMTimes

        public GMTimes​(java.lang.String lastState,
                       long lastStateChange)
      • GMTimes

        public GMTimes​(java.lang.String lastState)
      • GMTimes

        public GMTimes​(java.util.Map<java.lang.String,​java.lang.Long> times)
      • GMTimes

        public GMTimes()
    • Method Detail

      • getGMKeyArray

        public static java.lang.String[] getGMKeyArray()
      • magicNumberToGMName

        public static java.lang.String magicNumberToGMName​(int magicNumber)
      • getMostUsedGameMode

        public java.util.Optional<java.lang.String> 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:
        java.lang.IllegalArgumentException - If any parameter is null.
      • resetTimes

        public void resetTimes​(long time)