Package me.playernguyen.opteco.bStats
Class Metrics
java.lang.Object
me.playernguyen.opteco.OptEcoImplementation
me.playernguyen.opteco.bStats.Metrics
public class Metrics extends OptEcoImplementation
bStats collects some data for plugin authors.
Check out https://bStats.org/ to learn more about bStats!
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetrics.AdvancedBarChartRepresents a custom advanced bar chart.static classMetrics.AdvancedPieRepresents a custom advanced pie.static classMetrics.CustomChartRepresents a custom chart.static classMetrics.DrilldownPieRepresents a custom drilldown pie.static classMetrics.MultiLineChartRepresents a custom multi line chart.static classMetrics.SimpleBarChartRepresents a custom simple bar chart.static classMetrics.SimplePieRepresents a custom simple pie.static classMetrics.SingleLineChartRepresents a custom single line chart. -
Field Summary
Fields Modifier and Type Field Description static intB_STATS_VERSION -
Constructor Summary
Constructors Constructor Description Metrics(org.bukkit.plugin.Plugin plugin, int pluginId)Class constructor. -
Method Summary
Modifier and Type Method Description voidaddCustomChart(Metrics.CustomChart chart)Adds a custom chart.com.google.gson.JsonObjectgetPluginData()Gets the plugin specific data.booleanisEnabled()Checks if bStats is enabled.Methods inherited from class me.playernguyen.opteco.OptEcoImplementation
getAccountDatabase, getAccountManager, getConfigurationLoader, getDebugger, getLanguageLoader, getLogger, getPlugin, getStorageType, getTransactionManager
-
Field Details
-
B_STATS_VERSION
public static final int B_STATS_VERSION- See Also:
- Constant Field Values
-
-
Constructor Details
-
Metrics
public Metrics(org.bukkit.plugin.Plugin plugin, int pluginId)Class constructor.- Parameters:
plugin- The plugin which stats should be submitted.pluginId- The id of the plugin. It can be found at What is my plugin id?
-
-
Method Details
-
isEnabled
public boolean isEnabled()Checks if bStats is enabled.- Returns:
- Whether bStats is enabled or not.
-
addCustomChart
Adds a custom chart.- Parameters:
chart- The chart to add.
-
getPluginData
public com.google.gson.JsonObject getPluginData()Gets the plugin specific data. This method is called using Reflection.- Returns:
- The plugin specific data.
-