26 lines
676 B
Java
26 lines
676 B
Java
package net.therosegarden.playerstats;
|
|
|
|
import java.io.Closeable;
|
|
import java.util.Collection;
|
|
import java.util.UUID;
|
|
|
|
interface StatsStorage extends Closeable {
|
|
PlayerRecord load(UUID uuid, String currentName) throws Exception;
|
|
|
|
void save(PlayerRecord record) throws Exception;
|
|
|
|
void delete(UUID uuid) throws Exception;
|
|
|
|
default void saveAll(Collection<PlayerRecord> records) throws Exception {
|
|
for (PlayerRecord record : records) {
|
|
save(record);
|
|
}
|
|
}
|
|
|
|
void journal(UUID uuid, String playerName, String eventType, String detail) throws Exception;
|
|
|
|
@Override
|
|
default void close() throws java.io.IOException {
|
|
}
|
|
}
|