Skip to content
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

Optional use Player.getLocale() when running on Spigot #118

Closed
TheE opened this issue Nov 19, 2016 · 1 comment
Closed

Optional use Player.getLocale() when running on Spigot #118

TheE opened this issue Nov 19, 2016 · 1 comment
Assignees
Labels
c: bukkit-imp Affects the Bukkit version. s: fixed The issue has been resolved. t: enhancement An improvement of an existing function.
Milestone

Comments

@TheE
Copy link
Member

TheE commented Nov 19, 2016

Since some point before 1.7 Spigot added a getLocale() method to Player that returns the player's current locale as String.

While I do not want to enforce Spigot for using MyWarp, MyWarp could use this method if it is available instead of using reflection to access the locale field within Minecraft's player object.

@TheE TheE added c: bukkit-imp Affects the Bukkit version. t: enhancement An improvement of an existing function. labels Nov 19, 2016
@TheE TheE added this to the 3.0 milestone Nov 19, 2016
@TheE TheE self-assigned this Nov 19, 2016
@TheE TheE changed the title Optionale use Player.getLocale() when running on Spigot Optional use Player.getLocale() when running on Spigot Nov 19, 2016
@TheE
Copy link
Member Author

TheE commented Dec 11, 2016

To use this method at compile time, mywarp-bukkit would need to be builded against Spigot directly. Then: player.getLocale().

@TheE TheE modified the milestones: Long-term goals and ideas, 3.0 Feb 10, 2017
@TheE TheE modified the milestones: 3.0, Long-term goals and ideas Jul 29, 2017
TheE added a commit that referenced this issue Oct 13, 2017
…Spigot's getLocale()

I am still unhappy with the implementation of VersionSupport, so there might be further API changes.

Closes #160, #118.
@TheE TheE added the s: fixed The issue has been resolved. label Oct 13, 2017
@TheE TheE closed this as completed Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bukkit-imp Affects the Bukkit version. s: fixed The issue has been resolved. t: enhancement An improvement of an existing function.
Projects
None yet
Development

No branches or pull requests

1 participant