Fix remove unit repair api not working

This commit is contained in:
alexcrea 2024-11-15 18:03:23 +01:00
parent 2e7a9a8bd1
commit 4917a57dfa
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F

View file

@ -117,9 +117,10 @@ public class UnitRepairApi {
String repairableName = repairable.name();
FileConfiguration config = ConfigHolder.UNIT_REPAIR_HOLDER.getConfig();
config.set(unitName.toLowerCase() + repairableName.toUpperCase(), null);
config.set(unitName.toUpperCase() + repairableName.toLowerCase(), null);
config.set(unitName.toUpperCase() + repairableName.toUpperCase(), null);
config.set(unitName.toLowerCase() + "." + repairableName.toUpperCase(), null);
config.set(unitName.toUpperCase() + "." + repairableName.toLowerCase(), null);
config.set(unitName.toUpperCase() + "." + repairableName.toUpperCase(), null);
config.set(unitName.toLowerCase() + "." + repairableName.toLowerCase(), null);
// Test if it was the last value of this section
boolean lastValue = false;
@ -142,7 +143,7 @@ public class UnitRepairApi {
// We only need to "delete" as the lower case to be counted as deleted
ConfigHolder.UNIT_REPAIR_HOLDER.delete(unitName.toLowerCase() + repairableName.toLowerCase());
ConfigHolder.UNIT_REPAIR_HOLDER.delete(unitName.toLowerCase() + "." + repairableName.toLowerCase());
prepareSaveTask();
// Remove from gui