Fix v1.2.5 support, broken by API change in metrics

This commit is contained in:
Mike Primm 2013-01-15 00:30:08 -06:00
parent 828efec07f
commit 02a7cf2eb9

View file

@ -220,6 +220,7 @@ public class Metrics {
} }
// Begin hitting the server with glorious data // Begin hitting the server with glorious data
try {
task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() { task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {
private boolean firstPost = true; private boolean firstPost = true;
@ -254,6 +255,10 @@ 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;
} }