I am stupid.

This commit is contained in:
Sauilitired 2014-10-11 18:24:50 +02:00
parent 446cd422e0
commit 0160a39d9f
2 changed files with 15 additions and 6 deletions

View File

@ -53,8 +53,8 @@ public class UUIDHandler {
} }
long time = System.currentTimeMillis() - start; long time = System.currentTimeMillis() - start;
long timePerUUID = time / uuidMap.size(); long timePerUUID = uuidMap.size() / time;
PlotMain.sendConsoleSenderMessage("&cFinished caching of offlineplayers! Took &6" + time + "&cms (&6" + timePerUUID + "&c per second), &6" PlotMain.sendConsoleSenderMessage("&cFinished caching of offlineplayers! Took &6" + time + "&cms (&6" + timePerUUID + "&c per millisecond), &6"
+ length + " &cUUID's were cached" + " and there is now a grand total of &6" + uuidMap.size() + length + " &cUUID's were cached" + " and there is now a grand total of &6" + uuidMap.size()
+ " &ccached."); + " &ccached.");
} }

View File

@ -35,15 +35,24 @@ public class plugin extends SubCommand {
plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() { plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
@Override @Override
public void run() { public void run() {
try {
downloads = downloads =
convertToNumericString(getInfo("https://intellectualsites.com/spigot_api.php?method=downloads&url=http://www.spigotmc.org/resources/plotsquared.1177/"), false); convertToNumericString(getInfo("https://intellectualsites.com/spigot_api.php?method=downloads&url=http://www.spigotmc.org/resources/plotsquared.1177/"), false);
} catch (Exception e) {
downloads = "unknown";
}
} }
}, 1l); }, 1l);
plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() { plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
@Override @Override
public void run() { public void run() {
try {
version = version =
convertToNumericString(getInfo("https://intellectualsites.com/spigot_api.php?method=version&resource=1177"), true); convertToNumericString(getInfo("https://intellectualsites.com/spigot_api.php?method=version&resource=1177"), true);
} catch(Exception e) {
//Let's just ignore this, most likely error 500...
version = "unknown";
}
} }
}, 200l); }, 200l);
} }