Merge pull request #44 from Nesaak/master

Cache default player provider
This commit is contained in:
TheMode 2020-09-01 23:51:39 +02:00 committed by GitHub
commit cb5a507951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,9 +210,7 @@ public final class ConnectionManager {
* @return the current {@link PlayerProvider}
*/
public PlayerProvider getPlayerProvider() {
return playerProvider == null ?
(uuid, username, connection) -> new Player(uuid, username, connection) :
playerProvider;
return playerProvider == null ? playerProvider = Player::new : playerProvider;
}
/**