Skip to content

Unified timestamp + Unix submenu; add custom formatted copyable date - #347

Merged
mrbuilder1961 merged 6 commits into
mrbuilder1961:omniversfrom
JustAlittleWolf:feat/combinedContextTimeCopy
Sep 28, 2026
Merged

mrbuilder1961 merged 6 commits into
mrbuilder1961:omniversfrom
JustAlittleWolf:feat/combinedContextTimeCopy

Conversation

@JustAlittleWolf

Copy link
Copy Markdown
Contributor

Unifies the "Copy Unix Timestamp" and "Copy Timestamp" options into one "Copy Time" context entry.

Also adds an option to specify the format of an additional context menu entry for time (now the default)

This PR includes a patch for ContextMenu#get, which used string comparison previously. Due to the button for copying the formatted time having the same label as the button for copying the formatted message, it now instead tries to compare the translatable part of the component (which should be unique for the different options), and falls back to comparing string only, if it is not a translatable component.

07_11-16-56_javaw84d.mp4

This allows different context menu buttons to have the same label, as long as they have a different underlying translatable component (fall back to string equality if its not a translatable component)
@JustAlittleWolf JustAlittleWolf changed the title Feat/combined context time copy Unified Timestamp + Unix Copy Menu, Also add custom formatted copyable date Sep 7, 2026
@JustAlittleWolf

Copy link
Copy Markdown
Contributor Author

is one way to resolve #299

@mrbuilder1961

Copy link
Copy Markdown
Owner

Wow this looks great! A couple of minor notes:

  • when timestamps are present in a message, the 'Text' and 'Hover text' buttons should be above the other two options (but otherwise the order looks great)

  • in the ContextMenu.java javadocs, make sure the menu button entries are ordered as they appear in-game (no big deal though)

And one more thing while we're on the topic of timestamps - if you could remove the 'Time' part of the Unix translation ('Unix Time' -> 'Unix') that'd be perfect!

Thanks again for all your contributions!

@JustAlittleWolf

Copy link
Copy Markdown
Contributor Author

Thanks, both issues have been fixed with the latest commit!

@mrbuilder1961 mrbuilder1961 changed the title Unified Timestamp + Unix Copy Menu, Also add custom formatted copyable date Unified timestamp + Unix submenu; add custom formatted copyable date Sep 28, 2026
@mrbuilder1961
mrbuilder1961 merged commit 13414d7 into mrbuilder1961:omnivers Sep 28, 2026
1 check failed
mrbuilder1961 added a commit that referenced this pull request Sep 28, 2026
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.

2 participants