Skip to content

Conversation

@JRoy
Copy link
Member

@JRoy JRoy commented Aug 24, 2020

  • Made currency symbol standardized in Kit
    • Kits should be in a standardized format.
    • Having monetary rewards in kits should not break based off of a config value oriented around currency display (suffix).
    • Additionally, the dollar sign should be the standard money symbol which works on all servers and should not be tied to the server's individual currency symbol.
    • Note that the server's individual currency symbol will still work but probably should not be used due its volatility.
  • Reworked config currency symbol parsing in Settings
    • Simplifies the number of actions needed to sanitize the input.
    • Now just defaults to $ if the currency-symbol cannot be parsed.
  • Removed symbol-suffixed parsing in NumberUtil#sanitizeCurrencyString

JRoy added 3 commits August 24, 2020 14:31
Kits should be in a standardized format.
Having monetary rewards in kits should not break based off of a config value oriented around currency display (suffix).
Additionally, the dollar sign should be the standard money symbol which works on all servers and should not be tied to the server's individual currency symbol.
Note that the server's individual currency symbol will still work but probably should not be used due its volatility.
Simplifies the amount of actions needed to sanitize the input.
Now just defaults to `$` if the currency-symbol cannot be parsed.
@JRoy JRoy added the type: enhancement Features and feature requests. label Aug 24, 2020
@JRoy JRoy added this to the 2.18.2 milestone Aug 24, 2020
@JRoy JRoy requested a review from mdcfe September 7, 2020 16:00
@mdcfe
Copy link
Member

mdcfe commented Sep 9, 2020

Note to self (or others) of things to test before approval:

  • All signs that accept currency values (trade, buy, sell etc) - both custom currency symbols and $ are expected to work, and as either prefix/suffix as per the config (given that people may have previously set up signs with custom currency symbols/formatting)
  • Money given in kits - $<amount> is expected to work
  • All commands that accept a numeric currency amount - custom symbols, no symbol and $ are all expected to work, and as either prefix/suffix depending on config
  • Vault formatting method should always return custom currency symbol as either prefix/suffix as per config

# Conflicts:
#	Essentials/src/com/earth2me/essentials/Kit.java
#	Essentials/src/com/earth2me/essentials/Settings.java
#	Essentials/src/com/earth2me/essentials/utils/NumberUtil.java
@JRoy JRoy modified the milestones: 2.18.2, 2.19.0 Nov 9, 2020
@JRoy JRoy merged commit c6de771 into EssentialsX:2.x Dec 30, 2020
@JRoy JRoy deleted the rework/currency-symbol branch December 30, 2020 20:37
ressidell pushed a commit to ressidell/Essentials that referenced this pull request Apr 27, 2025
* Made currency symbol standardized in Kit 
  * Kits should be in a standardized format.
  * Having monetary rewards in kits should not break based off of a config value oriented around currency display (suffix).
  * Additionally, the dollar sign should be the standard money symbol which works on all servers and should not be tied to the server's individual currency symbol.
  * Note that the server's individual currency symbol will still work but probably should not be used due its volatility.
* Reworked config currency symbol parsing in Settings 
  * Simplifies the number of actions needed to sanitize the input.
  * Now just defaults to `$` if the currency-symbol cannot be parsed.
* Removed symbol-suffixed parsing in NumberUtil#sanitizeCurrencyString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Features and feature requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants