My initial thought on a potential strategy to refactor the calls to activatePlayerLocale is to utilize the fact that we are already maintaining state, to a small degree in the plugin, via the PlayGridMC.activePlayers hash map. By creating a session manager class we can centralize the calls to a player, letting the player's session object handle the language setting. Then the call only needs to happen once at login. Given that these calls are likely handled asynchronously, there is added benefit to maintaining the additional state for each player's session.
My initial thought on a potential strategy to refactor the calls to activatePlayerLocale is to utilize the fact that we are already maintaining state, to a small degree in the plugin, via the PlayGridMC.activePlayers hash map. By creating a session manager class we can centralize the calls to a player, letting the player's session object handle the language setting. Then the call only needs to happen once at login. Given that these calls are likely handled asynchronously, there is added benefit to maintaining the additional state for each player's session.