mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-23 16:48:16 +01:00
Add bStats plugin version
bStats 1.7 requires plugins to have an ID to submit data.
This commit is contained in:
parent
57af89f1d0
commit
0953b5627e
@ -119,6 +119,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
private Method methodUnloadChunk0;
|
||||
private boolean methodUnloadSetup = false;
|
||||
private boolean metricsStarted;
|
||||
private static final int BSTATS_ID = 1404;
|
||||
|
||||
@Override public int[] getServerVersion() {
|
||||
if (this.version == null) {
|
||||
@ -689,7 +690,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
return;
|
||||
}
|
||||
this.metricsStarted = true;
|
||||
Metrics metrics = new Metrics(this);// bstats
|
||||
Metrics metrics = new Metrics(this, BSTATS_ID);// bstats
|
||||
PlotSquared.log(Captions.PREFIX + "&6Metrics enabled.");
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,9 @@ public class Metrics {
|
||||
* Class constructor.
|
||||
*
|
||||
* @param plugin The plugin which stats should be submitted.
|
||||
* @param bstatsId ID of the plugin
|
||||
*/
|
||||
public Metrics(Plugin plugin) {
|
||||
public Metrics(Plugin plugin, int bstatsId) {
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("Plugin cannot be null!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user