com.massivecraft.factions

## Class MassiveStats

- java.lang.Object
- - com.massivecraft.factions.MassiveStats

All Implemented Interfaces:
  org.bukkit.event.Listener

    public class MassiveStats
    extends java.lang.Object
    implements org.bukkit.event.Listener

MassiveStats collects plugin and server information for plugin authors. You can learn more at our website: https://www.massivestats.com/

### Field Summary

Fields
`static java.lang.String` `API_URL`
`static int` `CLIENT_VERSION`
`static java.lang.String` `MASSIVE_UPDATE_PERMISSION`

### Constructor Summary

Constructors
Constructor and Description
`MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin)`
`MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin, int pingInterval)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### CLIENT_VERSION

    public static final int CLIENT_VERSION

See Also:
  Constant Field Values

#### API_URL

    public static final java.lang.String API_URL

See Also:
  Constant Field Values

#### MASSIVE_UPDATE_PERMISSION

    public static final java.lang.String MASSIVE_UPDATE_PERMISSION

See Also:
  Constant Field Values

### Constructor Detail

#### MassiveStats

    public MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin)

Parameters:
  `plugin` - The plugin you wish to collect data for.

#### MassiveStats

    public MassiveStats(org.bukkit.plugin.java.JavaPlugin plugin,
                        int pingInterval)

Parameters:
  `plugin` - The plugin you wish to collect data for.
  `pingInterval` - Duration between requests.

### Method Detail

#### isListenerDisabled

    public boolean isListenerDisabled()

Gets whether or not the built-in MassiveStats `PlayerJoinEvent` listener is enabled.

Returns:
  Whether or not the MassiveStats listener is enabled.

#### setListenerDisabled

    public void setListenerDisabled(boolean listenerDisabled)

Sets whether or not the built-in MassiveStats `PlayerJoinEvent` listener is enabled.

Parameters:
  `listenerDisabled` - Whether or not the MassiveStats listener is enabled.

#### start

    public void start()

Start the MassiveStats reporting timer. If the timer is already running, this method will do nothing.

#### stop

    public void stop()

Stop the MassiveStats reporting timer. Requests will no longer be sent to the server - or until `start()` is invoked.

#### getPingInterval

    public int getPingInterval()

Returns the duration, in seconds, that MassiveStats will wait before sending another request to the server.

Returns:
  Duration between requests.

#### setPingInterval

    public void setPingInterval(int pingInterval)

Sets the duration, in seconds, that MassiveStats should wait before sending another request to the server.

Parameters:
  `pingInterval` - Duration between requests.

#### getPlugin

    public org.bukkit.plugin.java.JavaPlugin getPlugin()

Returns the plugin that this MassiveStats instance is collecting data for.

Returns:
  MassiveStats instance plugin.

#### getLastResponse

    public com.massivecraft.factions.MassiveStatsDataResponse getLastResponse()

Returns the contents of the last response from the MassiveStats server.

Returns:
  MassiveStats server response.

#### onPlayerJoin

    public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event)