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

Placeholder Idea: Formatted dp #933

Open
dekrypted opened this issue Aug 6, 2024 · 1 comment
Open

Placeholder Idea: Formatted dp #933

dekrypted opened this issue Aug 6, 2024 · 1 comment

Comments

@dekrypted
Copy link

Currently, there is the formatted placeholder and specified decimal point placeholder. But the formatted placeholder truncates a lot and the decimal point one can get very long very fast. It would be nice if there was one which was formatted and decimal points. E.g. $15575 in %vault_eco_balance_formatted_2dp% would give 15.58k

Thanks

@Geolykt
Copy link
Contributor

Geolykt commented Aug 6, 2024

This project is not responsible for implementing formatting, as defined per https://github.com/MilkBowl/VaultAPI/blob/8bad2c479f531436b4b0694f5696b501d0afef3e/src/main/java/net/milkbowl/vault/economy/Economy.java#L62, nor is it responsible for defining the concrete placeholder.

The amount of fractional digits are defined by https://github.com/MilkBowl/VaultAPI/blob/8bad2c479f531436b4b0694f5696b501d0afef3e/src/main/java/net/milkbowl/vault/economy/Economy.java#L53.

So - further elaboration required, but from the looks of it this issue is out-of-scope for the Vault plugin (which is this repository) and the Vault API already provides the needed APIs anyways. It is likely that either your API provider does not correctly implement the API or that the API consumer makes use of the API in an incorrect manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants