Use toUpperCase() in SetPlayerTime step.

This commit fixes the `player-time-in-arena` per-arena setting by switching to `toUpperCase()` on the string value, which means that the values can actually result in something meaningful, rather than always throwing an exception.

The feature was broken in commit b1c6b61827, and it appears to be the only such instance to sneak through.

Fixes #621

Co-authored-by: Bobcat00 <[email protected]>
Co-authored-by: Chew <[email protected]>
This commit is contained in:
Andreas Troelsen
2020-05-17 08:22:56 +02:00
co-authored by Bobcat00 Chew
parent 58cb29ae97
commit 62496127d7
2 changed files with 2 additions and 1 deletions
@@ -34,7 +34,7 @@ class SetPlayerTime extends PlayerStep {
private static Time parseTime(ConfigurationSection settings) {
String value = settings.getString("player-time-in-arena", "world");
try {
return Time.valueOf(value.toLowerCase());
return Time.valueOf(value.toUpperCase());
} catch (IllegalArgumentException e) {
return null;
}