Skip to content

Commit

Permalink
修复PreLoginEvent逻辑,避免重复登录提示
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Dec 19, 2024
1 parent 7bc5e65 commit feb329b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cc/baka9/catseedlogin/bungee/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void onPlayerDisconnect(PlayerDisconnectEvent event) {
public void onPreLogin(PreLoginEvent event) {
String playerName = event.getConnection().getName();
try {
if (loggedInPlayerList.contains(playerName) || Communication.sendConnectRequest(playerName) == 1) {
if (loggedInPlayerList.contains(playerName) && (Communication.sendConnectRequest(playerName) == 1)) {
event.setCancelReason(new TextComponent("您已经登录,请勿重复登录。"));
event.setCancelled(true);
}
Expand Down

0 comments on commit feb329b

Please sign in to comment.