Skip to content

api: Add TitlePart#406

Merged
zml2008 merged 9 commits intoPaperMC:masterfrom
kezz:feature/alt-title-parts
Sep 4, 2021
Merged

api: Add TitlePart#406
zml2008 merged 9 commits intoPaperMC:masterfrom
kezz:feature/alt-title-parts

Conversation

@kezz
Copy link
Member

@kezz kezz commented Jun 16, 2021

This PR is an alternative to #320. With this PR, you would send individual title parts like:

audience.showTitlePart(TitlePart.TITLE, text("hello!"));
audience.showTitlePart(TitlePart.TIMES, times(0, 100, 15));

@kezz kezz force-pushed the feature/alt-title-parts branch from de6d58f to cd6e895 Compare June 22, 2021 13:17
@kezz kezz force-pushed the feature/alt-title-parts branch from cd6e895 to dea9991 Compare July 29, 2021 10:38
@kezz
Copy link
Member Author

kezz commented Jul 29, 2021

Just spotted some incorrect @since tags so have updated those and rebased to latest. For reference, the client doesn't care about the ordering of the packets, so the replacement implementation for the showTitle method is also fine.

@zml2008
Copy link
Member

zml2008 commented Aug 2, 2021

Could you add some API to this to map from a Title to and from its component TitleParts?

something like Title.part(TitlePart) and Title.title(PartValuePair...) or something along those lines?

@kezz
Copy link
Member Author

kezz commented Aug 2, 2021

Does anyone have any thoughts about sendTitlePart vs showTitlePart?

@zml2008 zml2008 added this to the 4.9.0 milestone Aug 2, 2021
@kashike
Copy link
Member

kashike commented Aug 2, 2021

Probably sendTitlePart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants