Skip to content

Commit

Permalink
fixed disconnect message when player is not whitelisted bug
Browse files Browse the repository at this point in the history
  • Loading branch information
OGBlackDiamond committed Aug 18, 2024
1 parent 469ab33 commit 0aeb995
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public void onPlayerConnect(ServerPostConnectEvent event) {
public void onPlayerDisconnect(DisconnectEvent event) {

if (!globalLeave) return;

// checks to ensure that a player was actually connected to the server before printing a message
if (event.getLoginStatus() != DisconnectEvent.LoginStatus.SUCCESSFUL_LOGIN) return;

Player player = event.getPlayer();

Expand Down

0 comments on commit 0aeb995

Please sign in to comment.