diff --git a/pom.xml b/pom.xml
index f2ecd340..99844c71 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.alpsbte
PlotSystem
- 3.0
+ 3.0.2
diff --git a/src/main/java/com/alpsbte/plotsystem/PlotSystem.java b/src/main/java/com/alpsbte/plotsystem/PlotSystem.java
index a966753f..b4b53ec7 100644
--- a/src/main/java/com/alpsbte/plotsystem/PlotSystem.java
+++ b/src/main/java/com/alpsbte/plotsystem/PlotSystem.java
@@ -57,7 +57,7 @@
import java.util.logging.Level;
public class PlotSystem extends JavaPlugin {
- private static final String VERSION = "3.0";
+ private static final String VERSION = "3.0.2";
private static PlotSystem plugin;
private ConfigUtil configManager;
@@ -168,7 +168,7 @@ public void onEnable() {
Bukkit.getConsoleSender().sendMessage(ChatColor.GOLD + "Update-Checker:");
UpdateChecker.getVersion(version -> {
- if (Double.parseDouble(VERSION) >= version) {
+ if (version.equals(VERSION)) {
Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "You are using the latest stable version.");
} else {
UpdateChecker.isUpdateAvailable = true;
@@ -353,10 +353,10 @@ public static class UpdateChecker {
* Get latest plugin version from SpigotMC
* @param version Returns latest stable version
*/
- public static void getVersion(final Consumer version) {
+ public static void getVersion(final Consumer version) {
try (InputStream inputStream = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + RESOURCE_ID).openStream(); Scanner scanner = new Scanner(inputStream)) {
if (scanner.hasNext()) {
- version.accept(Double.parseDouble(scanner.next()));
+ version.accept(scanner.next());
}
} catch (IOException ex) {
Bukkit.getLogger().log(Level.WARNING, "Cannot look for new updates: " + ex.getMessage());
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index a5946d7b..ccecffb5 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,5 +1,5 @@
main: com.alpsbte.plotsystem.PlotSystem
-version: 3.0
+version: 3.0.2
api-version: 1.12.2
name: Plot-System
author: R3tuxn & Cinnazeyy