mirror of
https://github.com/plexusorg/Plex.git
synced 2025-06-29 06:46:43 +00:00
add option to enable extra data such as punishments (default is yes)
This commit is contained in:
@ -67,7 +67,7 @@ public class SQLPlayerData
|
||||
* @return a PlexPlayer object
|
||||
* @see PlexPlayer
|
||||
*/
|
||||
public PlexPlayer getByUUID(UUID uuid)
|
||||
public PlexPlayer getByUUID(UUID uuid, boolean loadExtraData)
|
||||
{
|
||||
if (PlayerCache.getPlexPlayerMap().containsKey(uuid))
|
||||
{
|
||||
@ -79,7 +79,7 @@ public class SQLPlayerData
|
||||
PreparedStatement statement = con.prepareStatement(SELECT);
|
||||
statement.setString(1, uuid.toString());
|
||||
ResultSet set = statement.executeQuery();
|
||||
PlexPlayer plexPlayer = new PlexPlayer(uuid);
|
||||
PlexPlayer plexPlayer = new PlexPlayer(uuid, loadExtraData);
|
||||
while (set.next())
|
||||
{
|
||||
String name = set.getString("name");
|
||||
@ -111,6 +111,11 @@ public class SQLPlayerData
|
||||
return null;
|
||||
}
|
||||
|
||||
public PlexPlayer getByUUID(UUID uuid)
|
||||
{
|
||||
return this.getByUUID(uuid, true);
|
||||
}
|
||||
|
||||
public PlexPlayer getByName(String username)
|
||||
{
|
||||
PlexPlayer player = PlayerCache.getPlexPlayerMap().values().stream().filter(plexPlayer -> plexPlayer.getName().equalsIgnoreCase(username)).findFirst().orElse(null);
|
||||
|
Reference in New Issue
Block a user