Skip to content

Conversation

@davidmayr
Copy link
Contributor

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.

@astei astei added the type: feature New feature or request label Jul 24, 2021
String getUsername();

/**
* The locale the velocity proxy is translating its messages to. By default {@link PlayerSettings#getLocale()}
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better now?

Copy link
Contributor

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..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it good now?

@astei astei merged commit 3d8e909 into PaperMC:dev/3.0.0 Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants