Make warning of PlayerLoginEvent use unique plugin names (#12772)

This commit is contained in:
Pedro
2025-06-30 13:27:20 -04:00
committed by GitHub
parent 9686f8b34d
commit 723510f9aa

View File

@@ -3,9 +3,9 @@ package io.papermc.paper.connection;
import com.mojang.authlib.GameProfile;
import com.mojang.logging.LogUtils;
import io.papermc.paper.adventure.PaperAdventure;
import java.util.ArrayList;
import java.util.List;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import io.papermc.paper.util.StackWalkerUtil;
import net.minecraft.network.Connection;
import net.minecraft.network.chat.Component;
@@ -48,7 +48,7 @@ public class HorriblePlayerLoginEventHack {
}
if (!nagged) {
List<String> plugins = new ArrayList<>();
Set<String> plugins = new HashSet<>();
for (final RegisteredListener listener : PlayerLoginEvent.getHandlerList().getRegisteredListeners()) {
plugins.add(listener.getPlugin().getName());
}
@@ -60,10 +60,10 @@ public class HorriblePlayerLoginEventHack {
This event forces an alternative player loading path that is
deprecated and will be removed in a future release.
For more information, see: https://forums.papermc.io/threads/1-21-7.1635
For more information, see: https://go.papermc.io/announcement/1.21.7
Please notify the following plugin developers: {}
============================================================""", plugins.toString());
============================================================""", plugins);
nagged = true;
}
// We need to account for the fact that during the config stage we now call this event to mimic the old behavior.