public class MassiveStats
extends java.lang.Object
implements org.bukkit.event.Listener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
API_URL |
static int |
CLIENT_VERSION |
static java.lang.String |
MASSIVE_UPDATE_PERMISSION |
Constructor and Description |
---|
MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin) |
MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin,
int pingInterval) |
Modifier and Type | Method and Description |
---|---|
com.massivecraft.factions.MassiveStatsDataResponse |
getLastResponse()
Returns the contents of the last response from the MassiveStats server.
|
int |
getPingInterval()
Returns the duration, in seconds, that MassiveStats will wait before sending another request to the server.
|
org.bukkit.plugin.java.JavaPlugin |
getPlugin()
Returns the plugin that this MassiveStats instance is collecting data for.
|
boolean |
isListenerDisabled()
Gets whether or not the built-in MassiveStats
PlayerJoinEvent listener is enabled. |
void |
onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) |
void |
setListenerDisabled(boolean listenerDisabled)
Sets whether or not the built-in MassiveStats
PlayerJoinEvent listener is enabled. |
void |
setPingInterval(int pingInterval)
Sets the duration, in seconds, that MassiveStats should wait before sending another request to the server.
|
void |
start()
Start the MassiveStats reporting timer.
|
void |
stop()
Stop the MassiveStats reporting timer.
|
public static final int CLIENT_VERSION
public static final java.lang.String API_URL
public static final java.lang.String MASSIVE_UPDATE_PERMISSION
public MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin)
plugin
- The plugin you wish to collect data for.public MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin, int pingInterval)
plugin
- The plugin you wish to collect data for.pingInterval
- Duration between requests.public boolean isListenerDisabled()
PlayerJoinEvent
listener is enabled.public void setListenerDisabled(boolean listenerDisabled)
PlayerJoinEvent
listener is enabled.listenerDisabled
- Whether or not the MassiveStats listener is enabled.public void start()
public void stop()
start()
is invoked.public int getPingInterval()
public void setPingInterval(int pingInterval)
pingInterval
- Duration between requests.public org.bukkit.plugin.java.JavaPlugin getPlugin()
public com.massivecraft.factions.MassiveStatsDataResponse getLastResponse()
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event)