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 timePerUUID = time / uuidMap.size();
PlotMain.sendConsoleSenderMessage("&cFinished caching of offlineplayers! Took &6" + time + "&cms (&6" + timePerUUID + "&c per second), &6"
long timePerUUID = uuidMap.size() / time;
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()
+ " &ccached.");
}

View File

@ -35,15 +35,24 @@ public class plugin extends SubCommand {
plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
@Override
public void run() {
downloads =
convertToNumericString(getInfo("https://intellectualsites.com/spigot_api.php?method=downloads&url=http://www.spigotmc.org/resources/plotsquared.1177/"), false);
try {
downloads =
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);
plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
@Override
public void run() {
version =
convertToNumericString(getInfo("https://intellectualsites.com/spigot_api.php?method=version&resource=1177"), true);
try {
version =
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);
}