mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-04-12 19:06:03 +00:00
Lands Fix + Overriden world warning msg
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
main: me.SuperRonanCraft.BetterRTP.BetterRTP
|
||||
version: '3.0.4-2'
|
||||
version: '3.0.5'
|
||||
name: BetterRTP
|
||||
author: SuperRonanCraft
|
||||
softdepend:
|
||||
|
||||
Reference in New Issue
Block a user