Skip to content

Commit

Permalink
Update DefaultWorldConfiguration.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev7ex committed Jul 3, 2023
1 parent 870cfbc commit 99ac1ea
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,9 @@ public void write(@NotNull final BukkitWorldHolder worldHolder, @NotNull final W
if (value instanceof Boolean booleanValue) {
super.getFileConfiguration().set(worldHolder.getName() + "." + property.getStoragePath(), booleanValue);

} else if (value instanceof final String stringValue) {
if ((stringValue.equalsIgnoreCase("true")) || (stringValue.equalsIgnoreCase("false"))) {
final boolean booleanValue = (boolean) value;
super.getFileConfiguration().set(worldHolder.getName() + "." + property.getStoragePath(), booleanValue);
}
} else if ((value instanceof final String stringValue) && (stringValue.equalsIgnoreCase("true") || (stringValue.equalsIgnoreCase("false")))) {
final boolean booleanValue = (boolean) value;
super.getFileConfiguration().set(worldHolder.getName() + "." + property.getStoragePath(), booleanValue);

} else {
super.getFileConfiguration().set(worldHolder.getName() + "." + property.getStoragePath(), value);
Expand Down

0 comments on commit 99ac1ea

Please sign in to comment.