[SPIGOT-4826] TranslatableComponent doesn't work in the actionbar Created: 30/Apr/19  Updated: 30/Apr/19  Resolved: 30/Apr/19

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

Type: Bug Priority: Minor
Reporter: Leon Baronick Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: ChatComponentAPI
Environment:

No plugins installed other than the reproduction plugin.


Attachments: File test.jar    
Version: git-Spigot-1eece4f-dadc539
Guidelines Read: Yes

 Description   

See Forum post: https://www.spigotmc.org/threads/translatablecomponent-doesnt-work-in-the-actionbar.370799/

The title says it all, basically

 

The following line of code reproduces the bug:

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TranslatableComponent("block.minecraft.iron_ore"));

The text shown in the action bar is always the english translation of "iron ore", no matter what language the client uses, while

player.spigot().sendMessage(ChatMessageType.CHAT, new TranslatableComponent("block.minecraft.iron_ore"));

prints the right translation to the player's chat.

 

The Vanilla equivalent

/title @a actionbar {"translate":"block.minecraft.iron_ore"}

works just fine.

 

The minimal reproduction plugin executes these two lines, using a player interaction as a trigger (left/right click).

Set your game language to something other than english, join a server with the reproduction plugin, punch the air and enjoy the bug



 Comments   
Comment by Black Hole [ 30/Apr/19 ]

This is a vanilla issue:
https://bugs.mojang.com/browse/MC-119145

Generated at Sat Dec 13 20:46:17 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.