Skip to content

Commit

Permalink
1.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperdefined committed Jan 12, 2024
1 parent 588b110 commit df1c54b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<groupId>lol.hyper</groupId>
<artifactId>timebar</artifactId>
<version>1.3.8</version>
<version>1.3.9</version>
<packaging>jar</packaging>

<name>TimeBar</name>
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/lol/hyper/timebar/TimeBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'");
}
}

Expand All @@ -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) {
Expand Down

0 comments on commit df1c54b

Please sign in to comment.