|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.quartercode.quarterbukkit.util.Metrics
public class Metrics
The metrics class obtains data about a plugin and submits statistics about it to the metrics backend. Public methods provided by this class:
| Nested Class Summary | |
|---|---|
static class |
Metrics.Graph
Represents a custom graph on the website. |
static class |
Metrics.Plotter
Interface used to collect custom data for a plugin. |
| Constructor Summary | |
|---|---|
Metrics(org.bukkit.plugin.Plugin plugin)
Creates a new Metrics-Sender for a defined Plugin. |
|
| Method Summary | |
|---|---|
void |
addCustomData(Metrics.Plotter plotter)
Adds a custom data plotter to the default graph. |
void |
addGraph(Metrics.Graph graph)
Add a Graph object to Metrics that represents data for the plugin that should be sent to the backend. |
Metrics.Graph |
createGraph(java.lang.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. |
boolean |
equals(java.lang.Object obj)
|
java.io.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. |
int |
hashCode()
|
boolean |
isOptOut()
Has the server owner denied plugin metrics? |
boolean |
start()
Start measuring statistics. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Metrics(org.bukkit.plugin.Plugin plugin)
throws java.io.IOException
Plugin.
plugin - The Metrics-Plugin.
java.io.IOException - If something goes wrong while creating the configuration-file.| Method Detail |
|---|
public Metrics.Graph createGraph(java.lang.String name)
name - The name of the graph.
public void addGraph(Metrics.Graph graph)
graph - The name of the graph.public void addCustomData(Metrics.Plotter plotter)
plotter - The plotter to use to plot custom data.public boolean start()
public boolean isOptOut()
public void enable()
throws java.io.IOException
java.io.IOException - If something goes wrong while creating the configuration-file.
public void disable()
throws java.io.IOException
java.io.IOException - If something goes wrong while creating the configuration-file.public java.io.File getConfigFile()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||