mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Fix plex creating a new punished player everytime
This commit is contained in:
parent
211308e813
commit
e70a01868d
@ -58,7 +58,10 @@ public class PlayerListener extends PlexListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
PlayerCache.getPlexPlayerMap().put(player.getUniqueId(), plexPlayer); //put them into the cache
|
PlayerCache.getPlexPlayerMap().put(player.getUniqueId(), plexPlayer); //put them into the cache
|
||||||
|
if (!PlayerCache.getPunishedPlayerMap().containsKey(player.getUniqueId()))
|
||||||
|
{
|
||||||
PlayerCache.getPunishedPlayerMap().put(player.getUniqueId(), new PunishedPlayer(player.getUniqueId()));
|
PlayerCache.getPunishedPlayerMap().put(player.getUniqueId(), new PunishedPlayer(player.getUniqueId()));
|
||||||
|
}
|
||||||
|
|
||||||
assert plexPlayer != null;
|
assert plexPlayer != null;
|
||||||
|
|
||||||
@ -101,6 +104,5 @@ public class PlayerListener extends PlexListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
PlayerCache.getPlexPlayerMap().remove(event.getPlayer().getUniqueId()); //remove them from cache
|
PlayerCache.getPlexPlayerMap().remove(event.getPlayer().getUniqueId()); //remove them from cache
|
||||||
PlayerCache.getPunishedPlayerMap().remove(event.getPlayer().getUniqueId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user