small important fix

This commit is contained in:
alexcrea 2025-07-27 11:34:31 +02:00
parent 239dbed5e0
commit a411311bb6
Signed by: alexcrea
GPG key ID: E346CD16413450E3
2 changed files with 3 additions and 5 deletions

View file

@ -25,6 +25,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.function.Consumer;
@SuppressWarnings("UnstableApiUsage")
public class UnitRepairElementListGui extends
SettingGuiListConfigGui<ItemType, DoubleSettingGui.DoubleSettingFactory> implements ElementMappedToListGui {
@ -80,8 +81,6 @@ public class UnitRepairElementListGui extends
return;
}
String materialName = type.getKey().getKey().toLowerCase();
// Add new material
ConfigHolder.UNIT_REPAIR_HOLDER.getConfig().set(parentType.getKey() + "." + type.getKey(), 0.25);
@ -93,9 +92,8 @@ public class UnitRepairElementListGui extends
updateValueForGeneric(type, true);
this.parentGui.updateValueForGeneric(this.parentType, true);
// Display material edit setting
this.factoryMap.get(materialName).create().show(player);
this.factoryMap.get(type).create().show(player);
},
true
).show(event.getWhoClicked());

View file

@ -485,7 +485,7 @@ public class DoubleSettingGui extends AbstractSettingGui {
section = this.config.getConfig();
if (section.isDouble(alternativePath)) {
return BigDecimal.valueOf(section.getDouble(this.configPath)).setScale(2, RoundingMode.HALF_UP);
return BigDecimal.valueOf(section.getDouble(alternativePath)).setScale(2, RoundingMode.HALF_UP);
}
}
return this.defaultVal;