mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 04:33:56 -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.authlib.GameProfile;
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
import io.papermc.paper.adventure.PaperAdventure;
|
import io.papermc.paper.adventure.PaperAdventure;
|
||||||
import java.util.ArrayList;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.Set;
|
||||||
import io.papermc.paper.util.StackWalkerUtil;
|
import io.papermc.paper.util.StackWalkerUtil;
|
||||||
import net.minecraft.network.Connection;
|
import net.minecraft.network.Connection;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
@@ -48,7 +48,7 @@ public class HorriblePlayerLoginEventHack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!nagged) {
|
if (!nagged) {
|
||||||
List<String> plugins = new ArrayList<>();
|
Set<String> plugins = new HashSet<>();
|
||||||
for (final RegisteredListener listener : PlayerLoginEvent.getHandlerList().getRegisteredListeners()) {
|
for (final RegisteredListener listener : PlayerLoginEvent.getHandlerList().getRegisteredListeners()) {
|
||||||
plugins.add(listener.getPlugin().getName());
|
plugins.add(listener.getPlugin().getName());
|
||||||
}
|
}
|
||||||
@@ -60,10 +60,10 @@ public class HorriblePlayerLoginEventHack {
|
|||||||
|
|
||||||
This event forces an alternative player loading path that is
|
This event forces an alternative player loading path that is
|
||||||
deprecated and will be removed in a future release.
|
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: {}
|
Please notify the following plugin developers: {}
|
||||||
============================================================""", plugins.toString());
|
============================================================""", plugins);
|
||||||
nagged = true;
|
nagged = true;
|
||||||
}
|
}
|
||||||
// We need to account for the fact that during the config stage we now call this event to mimic the old behavior.
|
// 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