Skip to content

Commit

Permalink
Ignore PreLoginEvent if any other plugin was already disconnecting …
Browse files Browse the repository at this point in the history
…the player
  • Loading branch information
UserNugget committed Jun 26, 2024
1 parent ba64ef2 commit 0b7a4eb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ public AuthListener(LimboAuth plugin, Dao<RegisteredPlayer, String> playerDao, F
this.floodgateApi = floodgateApi;
}

@Subscribe
@Subscribe(order = PostOrder.LATE)
public void onPreLoginEvent(PreLoginEvent event) {
// Ignore this event if it is was denied by other plugin
if (!event.getResult().isAllowed()) {
return;
}

String username = event.getUsername();
if (!event.getResult().isForceOfflineMode()) {
if (this.plugin.isPremium(username)) {
Expand Down

0 comments on commit 0b7a4eb

Please sign in to comment.