feat: add comprehensive player statistics logging
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
|
||||
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 {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user