-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom localization for each player #537
Conversation
proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java
Outdated
Show resolved
Hide resolved
@@ -45,6 +46,21 @@ | |||
*/ | |||
String getUsername(); | |||
|
|||
/** | |||
* The locale the velocity proxy is translating its messages to. By default {@link PlayerSettings#getLocale()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not satisfied with this Javadoc. The description is very imprecise - we are not necessarily translating messages at this level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not. Perhaps Returns the locale the proxy will use to send messages translated via the Adventure global translator. By default, the value of {@link PlayerSettings#getLocale()} is used.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it good now?
I have a network where the player can choose their language for the network independently of their client language.
Velocity won't cooperate with this, so I have added a method to switch their language with a method.
If not set by a plugin, it will return the default language of the player in the settings object or null if the settings are null(On player login). The result of the getLocale method in the settings object will be unchanged by the set value.