Releases a small hotfix for sign color as version 0.9.2.3

This commit is contained in:
2021-11-25 04:27:36 +01:00
parent 7f9dc6756b
commit 445638a561
4 changed files with 13 additions and 11 deletions

View File

@ -188,15 +188,13 @@ public final class StargateGateConfig {
* @param mainSignColor <p>A string representing the main sign color</p>
*/
private void loadSignColor(String mainSignColor, String highlightSignColor) {
if (mainSignColor != null && highlightSignColor != null) {
try {
PortalSignDrawer.setMainColor(ChatColor.valueOf(highlightSignColor.toUpperCase()));
PortalSignDrawer.setHighlightColor(ChatColor.valueOf(highlightSignColor.toUpperCase()));
} catch (IllegalArgumentException | NullPointerException ignored) {
Stargate.logWarning("You have specified an invalid color in your config.yml. Defaulting to BLACK and WHITE");
PortalSignDrawer.setMainColor(ChatColor.BLACK);
PortalSignDrawer.setHighlightColor(ChatColor.WHITE);
}
try {
PortalSignDrawer.setMainColor(ChatColor.valueOf(mainSignColor.toUpperCase()));
PortalSignDrawer.setHighlightColor(ChatColor.valueOf(highlightSignColor.toUpperCase()));
} catch (IllegalArgumentException | NullPointerException exception) {
Stargate.logWarning("You have specified an invalid color in your config.yml. Defaulting to BLACK and WHITE");
PortalSignDrawer.setMainColor(ChatColor.BLACK);
PortalSignDrawer.setHighlightColor(ChatColor.WHITE);
}
}
}