mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2025-01-08 09:27:39 +01:00
Changed User-Agent in UpdateChecker
This commit is contained in:
parent
3c4a13a7ec
commit
c14e5d3e5a
7
pom.xml
7
pom.xml
@ -104,6 +104,13 @@
|
|||||||
<version>0.98.9</version>
|
<version>0.98.9</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/lib/CrackShot.jar</systemPath>
|
<systemPath>${project.basedir}/lib/CrackShot.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jojodmo.customitems</groupId>
|
||||||
|
<artifactId>CustomItems</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${project.basedir}/lib/CustomItemsAPI_PLACEHOLDER.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>at.pcgamingfreaks</groupId>
|
<groupId>at.pcgamingfreaks</groupId>
|
||||||
|
@ -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.mcVersion+")";
|
String userAgent = "ChestSort/"+plugin.getDescription().getVersion()+" (MC "+plugin.mcVersion+", "+plugin.getServer().getOnlinePlayers().size()+"/"+plugin.getServer().getOfflinePlayers().length+")";
|
||||||
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()));
|
||||||
|
13
src/main/java/de/jeffclan/hooks/CustomItemsHook.java
Normal file
13
src/main/java/de/jeffclan/hooks/CustomItemsHook.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package de.jeffclan.hooks;
|
||||||
|
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
public class CustomItemsHook {
|
||||||
|
|
||||||
|
public boolean isCustomItem(ItemStack item) {
|
||||||
|
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -16,7 +16,6 @@ public class MinepacksHook {
|
|||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
Plugin bukkitPlugin = Bukkit.getPluginManager().getPlugin("Minepacks");
|
Plugin bukkitPlugin = Bukkit.getPluginManager().getPlugin("Minepacks");
|
||||||
if(plugin.hookMinepacks && bukkitPlugin instanceof MinepacksPlugin) {
|
if(plugin.hookMinepacks && bukkitPlugin instanceof MinepacksPlugin) {
|
||||||
// Do something if Minepacks is not available
|
|
||||||
minepacks = (MinepacksPlugin) bukkitPlugin;
|
minepacks = (MinepacksPlugin) bukkitPlugin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user