Use spaces for "empty" titles.

Due to a breaking change in Spigot 1.17, sending a title with an empty string no longer works, even if a non-empty subtitle is provided. The TitleAnnouncer and TitleHealthBar components only use the subtitle portion of the title API to avoid obtrusive behavior.

With this commit, the two components send a single space character as the title. Effectively, there is no difference between showing the empty string or a single space on the client-side. It's a dirty hack to fix something that should be fixed in Spigot instead, but odds are that it won't be.

Fixes #683
This commit is contained in:
Nesseley
2021-08-09 21:32:55 +02:00
committed by Andreas Troelsen
parent c143cc81c9
commit c9766dee97
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -27,6 +27,7 @@ These changes will (most likely) be included in the next version.
- Pillagers and vindicators no longer spawn without their much-needed weapons. - Pillagers and vindicators no longer spawn without their much-needed weapons.
- Piglins, piglin brutes, and hoglins no longer zombify. This fixes a bug where the mobs would despawn due to the zombification process. - Piglins, piglin brutes, and hoglins no longer zombify. This fixes a bug where the mobs would despawn due to the zombification process.
- Reward groups with `nothing` in them no longer cause errors when earned/granted. - Reward groups with `nothing` in them no longer cause errors when earned/granted.
- The title-based announcer and the title-based boss health bar have been fixed to work with the breaking change to the Title API in Spigot 1.17.
## [0.106] - 2021-05-09 ## [0.106] - 2021-05-09
### Added ### Added