mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-04 04:12:54 +08:00
Fix counter
This commit is contained in:
parent
cf84877937
commit
7792c5c73f
@ -101,7 +101,7 @@ public final class DatabaseManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static synchronized int getNextId(Class<?> c) {
|
public static synchronized int getNextId(Class<?> c) {
|
||||||
DatabaseCounter counter = getDatastore().find(DatabaseCounter.class).filter(Filters.eq("_id", c.getName())).first();
|
DatabaseCounter counter = getDatastore().find(DatabaseCounter.class).filter(Filters.eq("_id", c.getSimpleName())).first();
|
||||||
if (counter == null) {
|
if (counter == null) {
|
||||||
counter = new DatabaseCounter(c.getSimpleName());
|
counter = new DatabaseCounter(c.getSimpleName());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user