Fixed key storage access in KeyStorage.java
Fix the retrieval and saving of keys by updating the path format used in config.getInt and config.set methods.
This commit is contained in:
parent
08370abf77
commit
ff05856494
|
|
@ -54,7 +54,7 @@ public class KeyStorage extends AbstractConfig {
|
|||
continue;
|
||||
}
|
||||
for (UUID uuid : uuids) {
|
||||
int keys = config.getInt(prefix, String.format("%s.%s", crate, uuid.toString()), 0);
|
||||
int keys = config.getInt(prefix + crate + ".", uuid.toString(), 0);
|
||||
count.put(uuid, keys);
|
||||
}
|
||||
KEYS.put(crate, count);
|
||||
|
|
@ -65,7 +65,7 @@ public class KeyStorage extends AbstractConfig {
|
|||
config.logger.info("Saving KeyStorage");
|
||||
KEYS.keySet()
|
||||
.forEach(crate -> KEYS.get(crate)
|
||||
.forEach((uuid, keys) -> config.set(prefix + crate, uuid.toString(), keys)));
|
||||
.forEach((uuid, keys) -> config.set(prefix + crate + ".", uuid.toString(), keys)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user