mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-11-15 23:25:53 +01:00
schedule the metrics to start after the server is finished loading up
This commit is contained in:
parent
cf7bc4079f
commit
0a677273c6
@ -133,8 +133,20 @@ public class Vault extends JavaPlugin {
|
||||
// Load up the Plugin metrics
|
||||
try {
|
||||
metrics = new Metrics(getDescription().getVersion());
|
||||
metrics.findCustomData(this);
|
||||
metrics.beginMeasuringPlugin(this);
|
||||
final Vault plugin = this;
|
||||
this.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
metrics.findCustomData(plugin);
|
||||
try {
|
||||
metrics.beginMeasuringPlugin(plugin);
|
||||
} catch (IOException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
}, 10);
|
||||
|
||||
} catch (IOException e) {
|
||||
// ignore exception
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user