PlayerKickEvent.leaveMessage(Component leaveMessage) doesn't work with null.
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
Línea de trabajo
The reporter traces the bug to the kick handling in paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch, where a null leave message falls back to the default. Read the PlayerList#remove overloads and how PlayerQuitEvent supplies the final message, then reproduce with a plugin that calls leaveMessage(null) on PlayerKickEvent. Done means a null leave message suppresses the broadcast without breaking the quit event.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected behavior
If I call PlayerKickEvent.leaveMessage(null), the leave message is set to null and so not sent, like it says in the description of the method.
Observed/Actual behavior
The leave message is still sent.
Steps/models to reproduce
@EventHandler
private void onPlayerKick(PlayerKickEvent event) {
event.leaveMessage(null);
}
- Log in with 2 accounts
- Kick one of them
- Observe leave message still being present
Plugin and Datapack List
Replicated with only my plugin.
Paper version
This server is running Paper version 26.3-237-main@7e88a0d (2026-11-01T19:08:12Z) (Implementing API version 26.3.build.237-stable)
You are running the latest version
Previous version: 26.3-236-f119026 (MC: 26.3)
Other
During my own analysis with the debugger and browing through source in intellij I came to the conclusion that it is caused by this line, which if the leave message is null, PlayerList#remove(net.minecraft.server.level.ServerPlayer) instead uses the default leave message. Then in PlayerList#remove(net.minecraft.server.level.ServerPlayer, net.kyori.adventure.text.Component) it calls PlayerQuitEvent with the supplied leave message, and uses the leave message out of that event, so using that event still works, but it's called later and doesn't have all the context.
- Lenguaje dominante
- Java
- Estrellas
- 12.8k
- Forks
- 3.6k
- Merge medio
- 2 d 21 h
- PR fusionados (30 d)
- 33
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PaperMC/Paper
-
Add .getIgniter() to ExplosiveMinecartPosiblemente ocupada @WouterGritter la tomó hace 51 días. Abiertostatus: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PaperMC/Paper#14097 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
BlockType#isOccluding is incorrectly handledPosiblemente ocupada @ryoji-ikeda la tomó hace 195 días. Abiertostatus: accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PaperMC/Paper#13790 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
status: needs triage version: 26.3
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
status: needs triage version: 26.3
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Baby foxes don't drop the item they are holdingPosiblemente ocupada @personalized-advertising la tomó hace 5 días. Abiertostatus: accepted version: 26.3
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
PaperMC/Paper#14453 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de PaperMC/Paper
Issues similares
-
Marketplace time-zone issueAbiertobug main ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
openhab/openhab-webui#4671 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
NearVanilla/IceCream#109 ·
Los mantenedores suelen responder en 1 día
-
getRawTextContent() returns the lines of every page in reverse order (bottom to top) since 4.0.3Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
bancolombia/bin-stash#79 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día