mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
Make warning of PlayerLoginEvent use unique plugin names (#12772)
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user