[Solved] Titles in Minecraft

Hello guys !

I’m looking how to set the “up title” and the “item title” with the Sponge API. I don’t know if these parts have a name so I added a picture (the red parts):

Let’s say I have a Text object, ready to be displayed. How can I display it in the “up title” or “item title” part ? Thank you in advance !

Nomeho - EzpzTeam

1 Like

There is an open issue to add an ‘up title’ (Boss Bar) API

‘item title’ (or Action Bar) is a ChatType, ChatTypes.ACTION_BAR
https://github.com/SpongePowered/SpongeAPI/blob/master/src/main/java/org/spongepowered/api/text/chat/ChatTypes.java#L52

use the sendMessage(ChatType, Text...) method (or similar)

example:
player.sendMessage(ChatTypes.ACTION_BAR, Texts.of("Some text"));

4 Likes

Thank you it is exactly what I was looking for ! :slight_smile:

2 Likes