[SPIGOT-3034] PlayerKickEvent.setLeaveMessage(String) doesn't actually do anything Created: 25/Jan/17  Updated: 16/Mar/22  Resolved: 16/Mar/22

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: pokechu22 Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: PlayerKickEvent, chat


 Description   

PlayerKickEvent.setLeaveMessage does not actually do anything; the message is ignored. (PlayerQuitEvent.setLeaveMessage does work, however).

To reproduce, create a plugin with the following:

 @EventHandler
 public void onKick(PlayerKickEvent e) {
  e.setLeaveMessage("... a leave message ...");
 }

... and then run /kick on a player. The normal "<player> left the game" message will be displayed instead of the custom "... a leave message ..." one.

I'm cleaning up some of the related parts of the code for a larger PR, so I'll end up fixing this within that soon; I'm just creating this ticket as a reference until then.



 Comments   
Comment by Marvin Rieple [ 11/Mar/22 ]

Made a PR for this: craftbukkit#1028

Generated at Fri Mar 14 15:03:40 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.