feat/translation #4

Closed
tropicalshadow wants to merge 5 commits from tropicalshadow/hudkit:feat/translation into main
Contributor
  • audience wrapper (WeakRef) for manual setting of locale (🤔maybe not needed but potental)
  • pass Pointered (new audience wrapper) to MiniMessage (Lang support)
  • make huds a WeakHashMap, don't keep hold of audiences :)
- audience wrapper (WeakRef) for manual setting of locale (🤔maybe not needed but potental) - pass Pointered (new audience wrapper) to MiniMessage (Lang support) - make huds a WeakHashMap, don't keep hold of audiences :)
Author
Contributor

👉 😀 👈

👉 😀 👈
Owner

I'll be back to home on Sunday, and I can continue hudkit development then. :)

I'll be back to home on Sunday, and I can continue hudkit development then. :)
perny left a comment

Looks pretty solid!

Looks pretty solid!
@ -0,0 +24,4 @@
fun getUsername(): String? = audience.get()?.get<String>(Identity.NAME)?.orElse(null)
fun getDisplayName(): Component? = audience.get()?.get<Component>(Identity.DISPLAY_NAME)?.orElse(null)
fun getLocale(): Locale = locale?: audience.get()?.get<Locale>(Identity.LOCALE)?.orElse(Locale.getDefault())?: Locale.getDefault()
Owner

Won't compile, there's a JVM signature clash.

The following declarations have the same JVM signature (getLocale()Ljava/util/Locale;):
fun (): Locale? defined in net.hudkit.api.HudAudience
fun getLocale(): Locale defined in net.hudkit.api.HudAudience

The var locale: Locale? property auto-generates a getter that conflicts with the explicit fun getLocale(): Locale method.

Won't compile, there's a JVM signature clash. The following declarations have the same JVM signature (getLocale()Ljava/util/Locale;): fun <get-locale>(): Locale? defined in net.hudkit.api.HudAudience fun getLocale(): Locale defined in net.hudkit.api.HudAudience The `var locale: Locale?` property auto-generates a getter that conflicts with the explicit `fun getLocale(): Locale` method.
Author
Contributor

should be resolved thanks to Claw

should be resolved thanks to Claw
tropicalshadow marked this conversation as resolved
Add @JvmName annotations to the locale property getter/setter to avoid
conflict with the explicit getLocale() method that provides fallback logic.
Reviewed-on: tropicalshadow/hudkit#1
Owner

Will be closed as the architecture is fundamentally different now.

Will be closed as the architecture is fundamentally different now.
perny closed this pull request 2026-05-06 12:14:31 +03:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
perny/hudkit!4
No description provided.