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:
co-authored by
Bobcat00
Chew
parent
58cb29ae97
commit
62496127d7
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user