From df1c54b10cefd6a971090e33dc7fbce9a35f00bd Mon Sep 17 00:00:00 2001 From: hyperdefined Date: Fri, 12 Jan 2024 15:08:08 -0500 Subject: [PATCH] 1.3.9 --- pom.xml | 2 +- src/main/java/lol/hyper/timebar/TimeBar.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 74cb5e4..ba4ffac 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ lol.hyper timebar - 1.3.8 + 1.3.9 jar TimeBar diff --git a/src/main/java/lol/hyper/timebar/TimeBar.java b/src/main/java/lol/hyper/timebar/TimeBar.java index d35015f..96f9e68 100644 --- a/src/main/java/lol/hyper/timebar/TimeBar.java +++ b/src/main/java/lol/hyper/timebar/TimeBar.java @@ -121,7 +121,7 @@ public void loadConfig() { World mainWorld = Bukkit.getWorld(worldName); // skip if the world is invalid if (mainWorld == null) { - logger.warning(worldName + " is not a valid world, skipping..."); + logger.warning(worldName + " is not a valid world, skipping. If it is a valid world, wait for your server to load then try '/timebar reload'"); continue; } // these are the worlds to display the timebar based on this world @@ -132,7 +132,7 @@ public void loadConfig() { if (world != null) { displayWorlds.add(world); } else { - logger.warning(worldName + " is not a valid world, skipping..."); + logger.warning(worldName + " is not a valid world, skipping. If it is a valid world, wait for your server to load then try '/timebar reload'"); } } @@ -145,8 +145,14 @@ public void loadConfig() { // default to blue since I like it bossBarColor = BossBar.Color.BLUE; } else { + // convert to uppercase and see if it's a real color color = color.toUpperCase(Locale.ROOT); - bossBarColor = BossBar.Color.valueOf(color); + try { + bossBarColor = BossBar.Color.valueOf(color); + } catch (IllegalArgumentException exception) { + logger.warning(color + " is not a valid bossbar color. Defaulting to blue."); + bossBarColor = BossBar.Color.BLUE; + } } if (realisticSeasons) {