2021-01-03 07:21:15 +00:00
|
|
|
package dev.plex.cache;
|
2020-10-27 21:04:05 +00:00
|
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
2021-01-03 07:21:15 +00:00
|
|
|
import dev.plex.player.PlexPlayer;
|
|
|
|
import dev.plex.player.PunishedPlayer;
|
2020-11-05 21:17:14 +00:00
|
|
|
import java.util.Map;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
2020-10-27 21:04:05 +00:00
|
|
|
public class PlayerCache
|
|
|
|
{
|
2020-10-28 03:49:56 +00:00
|
|
|
private static final Map<UUID, PlexPlayer> plexPlayerMap = Maps.newHashMap();
|
|
|
|
private static final Map<UUID, PunishedPlayer> punishedPlayerMap = Maps.newHashMap();
|
2020-10-27 21:04:05 +00:00
|
|
|
|
2020-10-28 03:49:56 +00:00
|
|
|
public static Map<UUID, PunishedPlayer> getPunishedPlayerMap()
|
|
|
|
{
|
2020-10-27 21:04:05 +00:00
|
|
|
return punishedPlayerMap;
|
|
|
|
}
|
|
|
|
|
2020-10-28 03:49:56 +00:00
|
|
|
public static Map<UUID, PlexPlayer> getPlexPlayerMap()
|
|
|
|
{
|
2020-10-27 21:04:05 +00:00
|
|
|
return plexPlayerMap;
|
|
|
|
}
|
2020-11-02 00:06:08 +00:00
|
|
|
|
|
|
|
public static PunishedPlayer getPunishedPlayer(UUID uuid)
|
|
|
|
{
|
|
|
|
return getPunishedPlayerMap().get(uuid);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static PlexPlayer getPlexPlayer(UUID uuid)
|
|
|
|
{
|
|
|
|
return getPlexPlayerMap().get(uuid);
|
|
|
|
}
|
2020-10-27 21:04:05 +00:00
|
|
|
}
|