mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-11-14 22:56:04 +01:00
updated User-Agent
This commit is contained in:
parent
d6f9b9014f
commit
43053474e0
@ -91,7 +91,7 @@ public class JeffChestSortUpdateChecker {
|
|||||||
|
|
||||||
plugin.getLogger().info("Checking for available updates...");
|
plugin.getLogger().info("Checking for available updates...");
|
||||||
try {
|
try {
|
||||||
String userAgent = "ChestSort/"+plugin.getDescription().getVersion()+"@MC/"+plugin.getServer().getClass().getPackage().getName();
|
String userAgent = "ChestSort/"+plugin.getDescription().getVersion()+" (MC "+plugin.mcVersion+")";
|
||||||
HttpURLConnection httpcon = (HttpURLConnection) new URL(latestVersionLink).openConnection();
|
HttpURLConnection httpcon = (HttpURLConnection) new URL(latestVersionLink).openConnection();
|
||||||
httpcon.addRequestProperty("User-Agent", userAgent);
|
httpcon.addRequestProperty("User-Agent", userAgent);
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(httpcon.getInputStream()));
|
BufferedReader reader = new BufferedReader(new InputStreamReader(httpcon.getInputStream()));
|
||||||
|
Loading…
Reference in New Issue
Block a user