Yes, I am really stupid... -_-

This commit is contained in:
Sauilitired
2014-10-11 18:30:24 +02:00
parent 0160a39d9f
commit 88fe47b7ee
3 changed files with 501 additions and 266 deletions

View File

@ -53,7 +53,7 @@ public class UUIDHandler {
}
long time = System.currentTimeMillis() - start;
long timePerUUID = uuidMap.size() / time;
double 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

@ -94,22 +94,16 @@ public class plugin extends SubCommand {
* @param link
* @return
*/
private static String getInfo(String link) {
try {
URLConnection connection = new URL(link).openConnection();
connection.addRequestProperty("User-Agent", "Mozilla/4.0");
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String document = "", line;
while ((line = reader.readLine()) != null) {
document += (line + "\n");
}
reader.close();
return document;
}
catch (Exception e) {
e.printStackTrace();
return "";
}
private static String getInfo(String link) throws Exception {
URLConnection connection = new URL(link).openConnection();
connection.addRequestProperty("User-Agent", "Mozilla/4.0");
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String document = "", line;
while ((line = reader.readLine()) != null) {
document += (line + "\n");
}
reader.close();
return document;
}
}