diff --git a/.gitignore b/.gitignore index b63da45..4918fc3 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ bin/ .vscode/ ### Mac OS ### -.DS_Store \ No newline at end of file +.DS_Store +/.gradle/ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 11f3083..c1bb20e 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties index c392d38..f023418 100644 --- a/.gradle/buildOutputCleanup/cache.properties +++ b/.gradle/buildOutputCleanup/cache.properties @@ -1,2 +1,2 @@ -#Sun Jul 02 14:20:27 CEST 2023 -gradle.version=8.2 +#Thu Apr 04 18:48:28 CEST 2024 +gradle.version=8.7 diff --git a/API/json.jar b/API/json.jar deleted file mode 100644 index 6583ea5..0000000 Binary files a/API/json.jar and /dev/null differ diff --git a/build.gradle b/build.gradle index 8ce1937..95da785 100644 --- a/build.gradle +++ b/build.gradle @@ -16,9 +16,8 @@ repositories { } dependencies { - compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT") + compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT") implementation 'org.jetbrains:annotations:23.0.0' - implementation files('API/json.jar') } java { @@ -29,7 +28,6 @@ java { jar { duplicatesStrategy = DuplicatesStrategy.INCLUDE - from(zipTree("API/json.jar")) from { subprojects.collect { it.sourceSets.main.output } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 15de902..48c0a02 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/org/scorpion/api/HoneyAPI.java b/src/main/java/org/scorpion/api/HoneyAPI.java index c5ee268..f8373bf 100644 --- a/src/main/java/org/scorpion/api/HoneyAPI.java +++ b/src/main/java/org/scorpion/api/HoneyAPI.java @@ -4,18 +4,12 @@ import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; -import org.json.JSONObject; import org.scorpion.user.HoneyUser; -import org.scorpion.util.Time; import org.scorpion.util.file.FileManager; import org.scorpion.util.user.User; -import java.io.BufferedReader; import java.io.File; -import java.io.InputStreamReader; import java.math.BigDecimal; -import java.net.URL; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.*; @@ -27,7 +21,7 @@ */ public class HoneyAPI { - public final static String VERSION = "1.8.0-SNAPSHOT"; + public final static String VERSION = "2.0.0-SNAPSHOT"; protected static final LinkedList warps = new LinkedList<>(); protected static final HashMap tpa = new HashMap<>(); protected static final HashMap tpaHere = new HashMap<>(); @@ -116,7 +110,6 @@ public static void manageLang() { addSetting("message.kick-syntax", "%prefix% §c/kick !"); addSetting("message.glow", "%prefix% §7Glow: §e%state%"); addSetting("message.glow-target", "%prefix% §7Glow: §e%state% §8| §6%target%"); - addSetting("message.rtp-deny", "%prefix% §cYou can't teleport because the cooldown hasn't worn off! (500 seconds total)"); addSetting("message.seen-target-offline", "%prefix% §7The player §c%target% §7is offline since §e%time%"); addSetting("message.seen-target-online", "%prefix% §7The player §c%target% §7is online since §e%time%"); addSetting("message.ban-player", "§c§lYou was banned!\n§7Reason: §e%reason%\n§7End: §e%time%"); @@ -124,7 +117,6 @@ public static void manageLang() { addSetting("message.ban-player-message", "%prefix% §e%target% §7wurde gebannt."); addSetting("message.kill", "%prefix% §7You was killed!"); addSetting("message.kill-target", "%prefix% §7The player §e%target% §7was killed!"); - ; addSetting("message.broadcast", "%prefix% §8» §a%bc%"); addSetting("message.broadcast-syntax", "%prefix% §c/Broadcast (Text)"); addSetting("message.sudo-syntax", "%prefix% §c/Sudo (Player) (Message)"); @@ -216,27 +208,12 @@ public static void sendTPA(Player sender, Player target) { target.sendMessage(getPrefix() + "§7You have received a teleport request from §c" + sender.getName() + "§7!"); } - private static Object getWebData(String u, String data) { - try { - URL url = new URL(u); - BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); - - String line = reader.readLine(); - JSONObject json = new JSONObject(line); - return json.getString(data); - } catch (Exception e) { - e.printStackTrace(); - } - return ""; - } - public static String getPluginVersion() { - return getWebData("https://sunlightscorpion.de/honey.json", "plugin").toString(); + return null; } public static boolean needUpdate(String version) { - String current = getWebData("https://sunlightscorpion.de/honey.json", "plugin").toString(); - return !current.equalsIgnoreCase(version); + return true; } public static boolean isSnapshot(String version) {