mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-30 05:53:39 +01:00
Debug
This commit is contained in:
parent
68dcbc34cb
commit
5c34d729bc
@ -84,24 +84,18 @@ public class StorageYaml extends Storage {
|
||||
public void save() {
|
||||
try {
|
||||
for (Map.Entry<String, Object> entry : lastSave.entrySet()) {
|
||||
System.out.println("key: " + entry.getKey());
|
||||
if (toSave.containsKey(entry.getKey())) {
|
||||
System.out.println("found");
|
||||
Object newValue = toSave.get(entry.getKey());
|
||||
System.out.println(entry.getValue() + ":" + newValue);
|
||||
if (!entry.getValue().equals(newValue)) {
|
||||
System.out.println("new value");
|
||||
dataFile.getConfig().set(entry.getKey(), newValue);
|
||||
}
|
||||
toSave.remove(entry.getKey());
|
||||
} else {
|
||||
System.out.println("Deleting " + entry.getValue());
|
||||
dataFile.getConfig().set(entry.getKey(), null);
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, Object> entry : toSave.entrySet()) {
|
||||
System.out.println(entry.getValue() + " INSERT");
|
||||
dataFile.getConfig().set(entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user