Class Analytics

java.lang.Object
com.welcome234.pluginsystem.Analytics

public class Analytics extends Object
This class is used for working with the built-in analytics feature
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addJoinChartValue​(long timestamp, int amount)
    Adds to the number of total joins in a day for the specified time stamp
    static void
    addUniqueChartValue​(long timestamp, int amount)
    Adds to the unique players in a day for the specified time stamp
    static int
    getJoinChartValue​(long timestamp)
    Gets the number of total joins in a day for the specified time stamp
    static int
    Gets the number of total joins ever on the server
    static double
    Gets the total playing time on this server
    static int
    getUniqueChartValue​(long timestamp)
    Gets the unique players in a day for the specified time stamp
    static int
    Gets the number of unique players on the server
    static void
    setJoinChartValue​(long timestamp, int amount)
    Sets the number of total joins in a day for the specified time stamp
    static void
    setJoinCount​(int joins)
    Sets the number of total joins to the specified amount
    static void
    setPlayTime​(double minutes)
    Sets the total playing time to the specified amount
    static void
    setUniqueChartValue​(long timestamp, int amount)
    Sets the unique players in a day for the specified time stamp

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getJoinCount

      public static int getJoinCount()
      Gets the number of total joins ever on the server
      Returns:
      Number of joins
    • setJoinCount

      public static void setJoinCount(int joins)
      Sets the number of total joins to the specified amount
      Parameters:
      joins - Number of joins
    • getUniqueCount

      public static int getUniqueCount()
      Gets the number of unique players on the server
      Returns:
      Unique player count
    • getPlayTime

      public static double getPlayTime()
      Gets the total playing time on this server
      Returns:
      Play time in minutes
    • setPlayTime

      public static void setPlayTime(double minutes)
      Sets the total playing time to the specified amount
      Parameters:
      minutes - Play time in minutes
    • getJoinChartValue

      public static int getJoinChartValue(long timestamp)
      Gets the number of total joins in a day for the specified time stamp
      Parameters:
      timestamp - Unix time in milliseconds
      Returns:
      Number of joins for this day
    • setJoinChartValue

      public static void setJoinChartValue(long timestamp, int amount)
      Sets the number of total joins in a day for the specified time stamp
      Parameters:
      timestamp - Unix time in milliseconds
      amount - Number of joins
    • addJoinChartValue

      public static void addJoinChartValue(long timestamp, int amount)
      Adds to the number of total joins in a day for the specified time stamp
      Parameters:
      timestamp - Unix time in milliseconds
      amount - Number of joins
    • getUniqueChartValue

      public static int getUniqueChartValue(long timestamp)
      Gets the unique players in a day for the specified time stamp
      Parameters:
      timestamp - Unix time in milliseconds
      Returns:
      Unique player count for this day
    • setUniqueChartValue

      public static void setUniqueChartValue(long timestamp, int amount)
      Sets the unique players in a day for the specified time stamp
      Parameters:
      timestamp - Unix time in milliseconds
      amount - Unique player count
    • addUniqueChartValue

      public static void addUniqueChartValue(long timestamp, int amount)
      Adds to the unique players in a day for the specified time stamp
      Parameters:
      timestamp - Unix time in milliseconds
      amount - Unique player count