Lands Fix + Overriden world warning msg

This commit is contained in:
SuperRonanCraft 2021-01-31 18:24:42 -05:00
parent 18c0190209
commit 0c78e3df6f
4 changed files with 14 additions and 16 deletions

View File

@ -7,7 +7,7 @@
<groupId>me.SuperRonanCraft</groupId>
<artifactId>BetterRTP</artifactId>
<packaging>jar</packaging>
<version>3.0.4-2</version>
<version>3.0.5</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
@ -231,11 +231,5 @@
<artifactId>particle</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>me.SuperRonanCraft</groupId>
<artifactId>BetterRTP</artifactId>
<version>3.0.3-1</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -49,6 +49,8 @@ public class RTP {
overriden.put(entry.getKey().toString(), entry.getValue().toString());
if (getPl().getSettings().debug)
getPl().getLogger().info("- Override '" + entry.getKey() + "' -> '" + entry.getValue() + "' added");
if (Bukkit.getWorld(entry.getValue().toString()) == null)
getPl().getLogger().warning("The world `" + entry.getValue() + "` doesn't seem to exist! Please update `" + entry.getKey() + "'s` override! Maybe there are capital letters?");
}
} catch (Exception e) {
//No Overrides

View File

@ -10,16 +10,18 @@ import java.net.URLConnection;
public class Updater {
public static String updatedVersion;
public static String updatedVersion = BetterRTP.getInstance().getDescription().getVersion();
public Updater(BetterRTP pl) {
try {
URLConnection con = new URL(getUrl() + project()).openConnection();
updatedVersion = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine();
} catch (Exception ex) {
Bukkit.getConsoleSender().sendMessage("[BetterRTP] Failed to check for an update on spigot");
updatedVersion = pl.getDescription().getVersion();
}
Bukkit.getScheduler().runTaskAsynchronously(pl, () -> {
try {
URLConnection con = new URL(getUrl() + project()).openConnection();
updatedVersion = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine();
} catch (Exception ex) {
Bukkit.getConsoleSender().sendMessage("[BetterRTP] Failed to check for an update on spigot");
updatedVersion = pl.getDescription().getVersion();
}
});
}
private String getUrl() {

View File

@ -1,5 +1,5 @@
main: me.SuperRonanCraft.BetterRTP.BetterRTP
version: '3.0.4-2'
version: '3.0.5'
name: BetterRTP
author: SuperRonanCraft
softdepend: