add option to enable extra data such as punishments (default is yes)

This commit is contained in:
Taah
2022-05-05 18:41:11 -07:00
parent b23b7c0c1b
commit c9da0177ad
4 changed files with 48 additions and 15 deletions

View File

@ -64,6 +64,23 @@ public class DataUtils
}
}
public static PlexPlayer getPlayer(UUID uuid, boolean loadExtraData)
{
if (PlayerCache.getPlexPlayerMap().containsKey(uuid))
{
return PlayerCache.getPlexPlayerMap().get(uuid);
}
if (Plex.get().getStorageType() == StorageType.MONGODB)
{
return Plex.get().getMongoPlayerData().getByUUID(uuid);
}
else
{
return Plex.get().getSqlPlayerData().getByUUID(uuid, loadExtraData);
}
}
public static PlexPlayer getPlayer(String username)
{
if (Plex.get().getStorageType() == StorageType.MONGODB)