Skip to content

Commit

Permalink
Pfeat(connect-listener): add condition if a player is kicked when att…
Browse files Browse the repository at this point in the history
…empt to join to avoid creating user data
  • Loading branch information
BryanGmG committed Sep 3, 2024
1 parent 2cf1856 commit fd4eac6
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public class PlayerConnectListener implements Listener {

@EventHandler
public void loginEvent(AsyncPlayerPreLoginEvent event){

if (event.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED){
return;
}

String senderUniqueId = event.getUniqueId().toString();

if (userRepository.exists(senderUniqueId)) {
Expand Down

0 comments on commit fd4eac6

Please sign in to comment.