Fix v1.2.5 support, broken by API change in metrics
This commit is contained in:
parent
828efec07f
commit
02a7cf2eb9
1 changed files with 7 additions and 2 deletions
|
|
@ -220,7 +220,8 @@ public class Metrics {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin hitting the server with glorious data
|
// Begin hitting the server with glorious data
|
||||||
task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {
|
try {
|
||||||
|
task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {
|
||||||
|
|
||||||
private boolean firstPost = true;
|
private boolean firstPost = true;
|
||||||
|
|
||||||
|
|
@ -253,7 +254,11 @@ public class Metrics {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 0, PING_INTERVAL * 1200);
|
}, 0, PING_INTERVAL * 1200);
|
||||||
|
} catch (NoSuchMethodError nsme) {
|
||||||
|
// Handle deprecated scheduler API stupidity
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue