Bug Verified

Death Messages Not Displaying Normally

#1764 opened by Unknown 5 years ago

Unknownreported this bug

Summary

Using the latest version of Paper at the time of writing (paperspigot 497 on Minecraft version 1.16.5), if a mob has a display name that has color codes in it, the death message will not display the color (will just revert it to the default white color).

Steps to reproduce

  1. Use Paper 497 and the latest dev version of MM (preferably with a test server with no other plugins on it).
  2. Be killed by a mob that has no custom kill message and has a colored display name. As an example, create a mob with the internal filename Test1 that is a witch and has the display name '&4Witch &EHas &CSomething &FTo &7Say'
  3. Get killed by the mob and the death message in chat will not be colored (it is supposed to as the "Test1" mob above has a colored name).

Current behavior

Death messages are not formatted correctly.

Intended correct behavior

Death messages display the color codes associated with the name of mobs.

Server log file

Not applicable.

Debug log snippet

Not applicable.

Proposed fixes

Could be a problem with either Paper or MM. I switched to spigot and it seems like the messages work.

Unknowncommented

I tested this and directed Alex here. Default kill messages do not transfer color with the mob name. Not sure if its a MM bug or a Paper issue, so not marking as a bug, just verified that its happening

Unknowncommented

I am having a similar issue when a player is killed by another player using a renamed enchanted item. The item name and hover text does not display properly in the vanilla player kill message. Instead it is printed as white text with no hover component. [Legacy attachment omitted]

Reverting back to Paper #472 appears to have fixed the issue.

Could it be possible that this issue was caused by the new Adventure library that was recently added to Paper in Build #473? https://github.com/PaperMC/Paper/pull/4842

Unknowncommented

This issue have been verified by the paper staff and they already reported that this is not a paper issue. However, this is due Adventure update. Please use the following link to read the paper's staff reply https://github.com/PaperMC/Paper/issues/5332

Unknowncommented

ill mark it as a bug then. I saw one close it saying it is not a paper issue.

Unknowncommented

I'm experiencing the same issue. Items in death messages (like the one in the screenshot) no longer show their colors and hover tooltips if MythicMobs is installed on Paper builds since the Adventure merge. Instead they're just plain white text without any hover actions whatsoever. Screenshot

It works just fine on any pre-adventure builds or Spigot though, which is how I was able to get this screenshot. This exclusively happens with MythicMobs installed. Nothing's wrong if MythicMobs isn't present.

If this were to be a Paper issue, they wouldn't be able to fix this due to MM being closed source, unless they were to be provided the necessary code to reproduce the problem.

Unknowncommented

my suggestion on a fix for this is to use Paper Components for Paper and paper forks servers when setting the death message, since PlayerDeathEvent#setDeathMessage() works fine for spigot.

@EventHandler
public void onPlayerDies(PlayerDeathEvent event){
  if (Spigot){
    event.setDeathMessage(event.getDeathMessage());
  }
  else {
    event.deathMessage(event.deathMessage());
  }
}
Sign in to join the discussion.