Package com.welcome234.pluginsystem
Class Analytics
java.lang.Object
com.welcome234.pluginsystem.Analytics
This class is used for working with the built-in analytics feature
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddJoinChartValue(long timestamp, int amount)Adds to the number of total joins in a day for the specified time stampstatic voidaddUniqueChartValue(long timestamp, int amount)Adds to the unique players in a day for the specified time stampstatic intgetJoinChartValue(long timestamp)Gets the number of total joins in a day for the specified time stampstatic intGets the number of total joins ever on the serverstatic doubleGets the total playing time on this serverstatic intgetUniqueChartValue(long timestamp)Gets the unique players in a day for the specified time stampstatic intGets the number of unique players on the serverstatic voidsetJoinChartValue(long timestamp, int amount)Sets the number of total joins in a day for the specified time stampstatic voidsetJoinCount(int joins)Sets the number of total joins to the specified amountstatic voidsetPlayTime(double minutes)Sets the total playing time to the specified amountstatic voidsetUniqueChartValue(long timestamp, int amount)Sets the unique players in a day for the specified time stamp
-
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 millisecondsamount- 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 millisecondsamount- 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 millisecondsamount- 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 millisecondsamount- Unique player count
-