Skip to content

Fix underline formatting on Hytale 0.5 - #7

Open
Jhiynn wants to merge 1 commit into
Zoltus:mainfrom
Jhiynn:codex/fix-maybebool-compat
Open

Fix underline formatting on Hytale 0.5#7
Jhiynn wants to merge 1 commit into
Zoltus:mainfrom
Jhiynn:codex/fix-maybebool-compat

Conversation

@Jhiynn

Copy link
Copy Markdown

Summary

  • Avoid a hard runtime dependency on com.hypixel.hytale.protocol.MaybeBool when applying underline formatting.
  • Resolve FormattedMessage.underlined at runtime so TinyMessage works with both the older MaybeBool protocol shape and the newer Boolean field used by Hytale 0.5.x.
  • Update the compile-only Hytale Server API version to 0.5.0 because the previous 2026.01.24-6e2d4fc36 artifact is no longer available from the release Maven repository.

Why

On Hytale 0.5.x, MaybeBool no longer exists in com.hypixel.hytale.protocol. Parsing a message with underline formatting, for example <u>text</u>, can throw:

java.lang.NoClassDefFoundError: com/hypixel/hytale/protocol/MaybeBool

This happened while TinyMessage was used by BerryChat, and the exception was raised from TinyMsg.createStyledMessage while handling a custom UI link click.

Testing

  • ./gradlew.bat clean build
  • JShell probe against Hytale Server 0.5.0: <u>hi</u> sets FormattedMessage.underlined to Boolean true.
  • JShell probe against Hytale Server 0.4.0: <u>hi</u> still sets FormattedMessage.underlined to MaybeBool.True.

@Zoltus

Copy link
Copy Markdown
Owner

Thanks for the pr. Does it stil lwork with the latest? I might merge it,
Anyways This project is a mess and there is 10x better ways to do this, I just made it quick so I could get colors working easily. I should redo the whole thing.

@Jhiynn

Jhiynn commented Jun 8, 2026

Copy link
Copy Markdown
Author

Works. But my Agent did everything automatically. So should review it.

Sign up for freeto 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.

2 participants

@Jhiynn@Zoltus