AppleDash / SaneEconomy

Finally, a sane economy plugin for Bukkit.
https://www.spigotmc.org/resources/saneeconomy-simple-but-featureful-economy.26223/
GNU General Public License v3.0
19 stars 24 forks source link

Replace %s with %name, %balance, etc. in messages.yml #26

Closed featuredepix closed 7 years ago

featuredepix commented 7 years ago

It would make more sense in my opinion for you to have specific variables in the messages.yml such as %name and %balance. At the moment, because it only has %s, you are limited in the fact that you have to include both %s's in the message if you want the second one to be printed.

For example, on the balance message, I just want it to print out the balance and nothing else; no player name. Currently, if I set the message to just '%s' it will print out the player name because it takes the first %s and sets that to the player name, not the balance. I can only print the balance if the player's name is printed as well. Surely it would make more sense to have it so that you could use '%balance' or '%player' or a mixture of both?

AppleDash commented 7 years ago

Issue is that %s is built into Java - to use actual words I'd have to write a separate parser. I'll look into it at some point.

On December 13, 2016 4:05:35 PM EST, featuredepix notifications@github.com wrote:

It would make more sense in my opinion for you to have specific variables in the messages.yml such as %name and %balance. At the moment, because it only has %s, you are limited in the fact that you have to include both %s's in the message if you want the second one to be printed.

For example, on the balance message, I just want it to print out the balance and nothing else; no player name. Currently, if I set the message to just '%s' it will print out the player name because it takes the first %s and sets that to the player name, not the balance. I can only print the balance if the player's name is printed as well. Surely it would make more sense to have it so that you could use '%balance' or '%player' or a mixture of both?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/AppleDash/SaneEconomy/issues/26

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

featuredepix commented 7 years ago

As a temporary fix could you have it so that on the balance message if only one %s is in the message, it defaults to the player's balance and not their name? I can't think of a scenario when you would just need to print the player's name and not their balance.

AppleDash commented 7 years ago

This has been fixed in 0.10.0 - 0.10.0 is not yet released, but when it is, the plugin will notify you to update.

It's not exactly as you described, but the placeholders have been changed to {1} {2} etc so that you can change the order around or even leave one or both out if you want.

AppleDash commented 7 years ago

Try 0.10.1.