Rework punishment system by deleting the Ban and BanManager and moving everything into Punishment Manager. TODO cache punishments maybe? who knows! add an active field to punishments and fix the ban service to actually unban players

This commit is contained in:
Taah
2022-02-21 16:20:22 -08:00
parent d4578f2255
commit 6f506ac5cb
16 changed files with 295 additions and 381 deletions

View File

@ -6,7 +6,6 @@ import dev.morphia.Datastore;
import dev.morphia.Morphia;
import dev.morphia.mapping.MapperOptions;
import dev.plex.Plex;
import dev.plex.banning.Ban;
import dev.plex.player.PlexPlayer;
public class MongoConnection
@ -31,7 +30,6 @@ public class MongoConnection
MongoClient client = MongoClients.create(connectionString);
Datastore datastore = Morphia.createDatastore(client, database, MapperOptions.DEFAULT);
datastore.getMapper().map(PlexPlayer.class);
datastore.getMapper().map(Ban.class);
datastore.ensureIndexes();
plugin.setStorageType(StorageType.MONGODB);
return datastore;