public class McStatsMetrics extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
McStatsMetrics.Graph
Represents a custom graph on the website
|
static class |
McStatsMetrics.Plotter
Interface used to collect custom data for a plugin
|
| Constructor and Description |
|---|
McStatsMetrics(org.bukkit.plugin.Plugin plugin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGraph(McStatsMetrics.Graph graph)
Add a Graph object to BukkitMetrics that represents data for the plugin that should be sent to
the backend
|
McStatsMetrics.Graph |
createGraph(String name)
Construct and create a Graph that can be used to separate specific plotters to their own graphs
on the metrics website.
|
void |
disable()
Disables metrics for the server by setting "opt-out" to true in the config file and canceling
the metrics task.
|
void |
enable()
Enables metrics for the server by setting "opt-out" to false in the config file and starting
the metrics task.
|
File |
getConfigFile()
Gets the File object of the config file that should be used to store data such as the GUID and
opt-out status
|
static byte[] |
gzip(String input)
GZip compress a string of bytes
|
boolean |
isOptOut()
Has the server owner denied plugin metrics?
|
boolean |
start()
Start measuring statistics.
|
public McStatsMetrics(org.bukkit.plugin.Plugin plugin)
throws IOException
IOExceptionpublic static byte[] gzip(String input)
public void addGraph(McStatsMetrics.Graph graph)
graph - The name of the graphpublic McStatsMetrics.Graph createGraph(String name)
name - The name of the graphpublic void disable()
throws IOException
IOExceptionpublic void enable()
throws IOException
IOExceptionpublic File getConfigFile()
public boolean isOptOut()
public boolean start()
Copyright © 2017. All rights reserved.