From d18bd94b3a63f803e799ffd0cb1f3d31e4e475aa Mon Sep 17 00:00:00 2001 From: RonanCraft Date: Mon, 10 Jun 2024 10:33:25 -0400 Subject: [PATCH] locations.yml loading fix --- .../BetterRTP/references/rtpinfo/worlds/WorldLocation.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldLocation.java b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldLocation.java index 7d6a01e..7239f2b 100644 --- a/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldLocation.java +++ b/src/main/java/me/SuperRonanCraft/BetterRTP/references/rtpinfo/worlds/WorldLocation.java @@ -43,7 +43,10 @@ public class WorldLocation implements RTPWorld, RTPWorld_Defaulted { if (section.get("World") != null) { if (section.get("World").getClass() == String.class) { world = Bukkit.getWorld(section.get("World").toString()); - BetterRTP.debug("- - World: " + world.getName()); + if (world != null) + BetterRTP.debug("- - World: " + world.getName()); + else + BetterRTP.getInstance().getLogger().warning("Location `" + location_name + "` is declared, but the world " + section.get("World").toString() + " doesn't exist!"); } } if (world == null) {