Repository navigation
Replies: 3 comments 2 replies
|
I'm assuming you are using Paper. You seem to be making it more complex than needed. @EventHandler
public void onEvent(ChatEvent event) {
final TranslatableComponent component = Component.translatable(new ItemStack(Material.ANCIENT_DEBRIS));
final Component mini = MiniMessage.miniMessage().deserialize("<translatable>", Placeholder.component("translatable", component));
event.getPlayer().sendMessage(mini);
}This seems to do what you want, and works fine for me. |
|
Thanks for your message. I just figured out that it is also important, to use the correct "sendMessage()" method from Kyori (not Bukkit). |
|
I do have another question. I dont have an idea where/how to inculde that. Do i need to make another Placeholder? Or is it some kind of component? |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
i need some help with translatables and dynamic replacements. I have gone through the docs multiple times but i can't get it to work.
The "best" version i have is:
The output this gives me is:
item.minecraft.ancient_debris.I have tried dozens of variants but i can't get it to work. What am i doing wrong? Please help me out with that :)
All reactions