Merge pull request '14.5' (#19) from 14.5 into development

Reviewed-on: #19
This commit is contained in:
JaTiTV 2023-05-17 18:44:01 +00:00
commit 32fe2ab579

View File

@ -5,7 +5,6 @@ import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
@ -13,6 +12,7 @@ import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.util.Date; import java.util.Date;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;
public class T2CnameHistory { public class T2CnameHistory {
public static class NameLookup { public static class NameLookup {
@ -93,7 +93,7 @@ public class T2CnameHistory {
con.setReadTimeout(2000); con.setReadTimeout(2000);
con.connect(); con.connect();
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String response = in.readLine(); String response = in.lines().collect(Collectors.joining());
in.close(); in.close();
return response; return response;
} }