From 2dfcd03423e4c334ad004687c5cca144e5c063ad Mon Sep 17 00:00:00 2001 From: vk2gpz Date: Sat, 7 Jan 2023 12:10:59 +1100 Subject: [PATCH 1/4] added an entry for NumberFormatter --- Placeholders.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Placeholders.md b/Placeholders.md index 35a58cc..5ae87c5 100644 --- a/Placeholders.md +++ b/Placeholders.md @@ -66,7 +66,7 @@ If the command itself isn't there and `NO DOWNLOAD COMMAND` instead is shown, th - **[MySQLTokens](#mysqltokens)** - ### **N** - - *No Expansions* + - **[NumberFormatter](#numberformatter)** - ### **O** - **[OtherPlayer](#otherplayer)** @@ -815,6 +815,25 @@ A majority of these Expansions are maintained by the PlaceholderAPI team and can ---- +- ### **NumberFormatter** + > /papi ecloud download NumberFormatter + + More info about this expansion can be found on the [PAPI-NumberFormatter](https://polymart.org/resource/3316)). + For instance: + if %tokenenchant_token_long% returns 43535709321 + + %nf_4X_tokenenchant_token_long% will return 43B, + + %nf_#,##0.#_tokenenchant_token_long% will return 43,535,709,321. + + `[]` is optional and `<>` is required. + + ``` + %nf__% # Converts a number produced by %other_placeholder% to a number using the specified format. + ``` + +---- + - ### **OtherPlayer** > /papi ecloud download OtherPlayer From 165f91bf9a19676fd3d939b5f3ef475e422ada02 Mon Sep 17 00:00:00 2001 From: vk2gpz Date: Sat, 7 Jan 2023 12:11:58 +1100 Subject: [PATCH 2/4] updated the description of NumberFormatter --- Placeholders.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Placeholders.md b/Placeholders.md index 5ae87c5..c7996f8 100644 --- a/Placeholders.md +++ b/Placeholders.md @@ -819,7 +819,9 @@ A majority of these Expansions are maintained by the PlaceholderAPI team and can > /papi ecloud download NumberFormatter More info about this expansion can be found on the [PAPI-NumberFormatter](https://polymart.org/resource/3316)). + For instance: + if %tokenenchant_token_long% returns 43535709321 %nf_4X_tokenenchant_token_long% will return 43B, From 7414f0d0d3b39f11985df4b410e0d186e660bcd1 Mon Sep 17 00:00:00 2001 From: vk2gpz Date: Sat, 7 Jan 2023 12:44:12 +1100 Subject: [PATCH 3/4] NumberFormtter now supports [:locale] option. --- Placeholders.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Placeholders.md b/Placeholders.md index c7996f8..d597fdb 100644 --- a/Placeholders.md +++ b/Placeholders.md @@ -826,12 +826,14 @@ A majority of these Expansions are maintained by the PlaceholderAPI team and can %nf_4X_tokenenchant_token_long% will return 43B, - %nf_#,##0.#_tokenenchant_token_long% will return 43,535,709,321. + %nf_#,##0.#_tokenenchant_token_long% will return 43,535,709,321 + %nf_#,##0.0#:IT_tokenenchant_token_long% will return 43.535.709.321,0 + `[]` is optional and `<>` is required. ``` - %nf__% # Converts a number produced by %other_placeholder% to a number using the specified format. + %nf_[:locale]_% # Converts a number produced by %other_placeholder% to a number using the specified format. ``` ---- From a567caabf157cb8f0360587621ef3a39e383c96b Mon Sep 17 00:00:00 2001 From: vk2gpz Date: Sat, 7 Jan 2023 14:18:49 +1100 Subject: [PATCH 4/4] added comments for Deprecated placeholders. --- Placeholders.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Placeholders.md b/Placeholders.md index d597fdb..ff3e075 100644 --- a/Placeholders.md +++ b/Placeholders.md @@ -5714,10 +5714,11 @@ All placeholders are listed here: https://wiki.staffplusplus.org/integrations/pa If you add ```_long``` to the cost related placeholder, it will returne a number without comma/decimal point. ``` - %tokenenchant_token% - %tokenenchant_token_long% - %tokenenchant_token_num% - %tokenenchant_token_num_long% + %tokenenchant_tokens% : Returns the token balance as a double. For formatting, use NumberFormat placeholder %nf_%. + %tokenenchant_token% : Deprecated. (use %tokenenchant_tokens%) + %tokenenchant_token_long% : Deprecated. (use %tokenenchant_tokens%) + %tokenenchant_token_num% : Deprecated. (use %tokenenchant_tokens%) + %tokenenchant_token_num_long% : Deprecated. (use %tokenenchant_tokens%) %tokenenchant__level% %tokenenchant__cost% : cost to increment the enchantmnt level by one from the current level %tokenenchant__costmax% : cost to increment the enchantmnt level to its maax one from the current level @@ -5729,17 +5730,17 @@ All placeholders are listed here: https://wiki.staffplusplus.org/integrations/pa %tokenenchant__description% %tokenenchant__version% %tokenenchant__fullrefund% - %tokenenchant__fullrefund_long% + %tokenenchant__fullrefund_long% : Deprecated. (For formatting, use NumberFormat placeholder %nf_%.) %tokenenchnat__refund_Y% - %tokenenchnat__refund_Y_long% + %tokenenchnat__refund_Y_long% : Deprecated. (For formatting, use NumberFormat placeholder %nf_%.) %tokenenchant__alias% %tokenenchant_tokenmultiplier% %tokenenchant__occurrencemultiplier% %tokenenchant__occurrence_% : the activation chance (in %) for the at the level . If == 0, chance of the current level will be returned. %tokenenchant_repair_cost% - %tokenenchant_repair_cost_long% + %tokenenchant_repair_cost_long% : Deprecated. (For formatting, use NumberFormat placeholder %nf_%.) %tokenenchant_repair_cost_num% - %tokenenchant_repair_cost_num_long% + %tokenenchant_repair_cost_num_long% : Deprecated. (For formatting, use NumberFormat placeholder %nf_%.) %tokenenchant_enchantments% %tokenenchant_baltop__name% : The name of X-th baltop player %tokenenchant_baltop__balance% : The balance of X-th baltop player