PlayGrid / playgrid-bukkit

PlayGrid Bukkit Plugin
1 stars 1 forks source link

Refactor player store to track player language to automate language setting for pgp-java calls #10

Open daronstinnett opened 10 years ago

daronstinnett commented 10 years ago

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.