ChestShop (iConomyChestShop)

ChestShop (iConomyChestShop)

6M Downloads

New issue with PlayerPoints -- suppurting Currency Type

mrcoffee1026 opened this issue ยท 10 comments

commented

Plugin Version

ChestShop's version is: 3.10-SNAPSHOT (build 164)

Plugin Config

not relevant for this discussion

Server Version

This server is running Paper version git-Paper-629 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

Server Log

not relevant for this discussion

What other plugins are you running?

PlayerPoints 3.0.1

What is happening?

As of now: "50" is treated as "50 Points" whereas "$50" is treated as "$50", which is what signs made with essentials still use as currency. Since the chest shops do not specify currency... and do not ALLOW a currency to be set and still be a valid sign... every single sign on the server made by chest shop is now only using points for currency. We need this fixed in a hurry. Thing is there are a HUGE LOAD of shop signs and it would be a massive undertaking to redo them all. I would strongly suggest adding to config a default currency type... and then for something like points ALSO make a currency type like "50p" on the sign, or "p50" so that it can't be used in error. Points are far more valuable to my players so it would be better to default to $ if currency is not specified.

PlayerPoints info here: https://www.spigotmc.org/resources/playerpoints.80745/

What did you expect to happen?

Player chest shops with "S 50" or "B 50" prices to be using dollars and not points.

Additional context

I have contacted the other author, they can perhaps have a solution to this too, but the underlying issue seems to be that both plugins are using vault and yours isn't specifying a currency, that is just a guess, however.

commented

The main issue here is that Vault has no currency support nor can it be used to hook into multiple economy provider plugins at once. Ideally one would be able to specify the economy provider used for each plugin. (something that my Tresor project is aiming to provide) Atm. your best solution would be to write a ChestShop extension which contains a listener similar to the VaultListener which hooks into PlayerPoints and handles the economy events that way.

A different issue would be to allow specifying the currency or even economy provider directly via characters on the sign but due to the space on that being limited I could imagine that that gets crammed pretty quickly. (But that wouldn't be possible without the multi currency/economy provider support in the first place anyways)

commented

WORSE than that, if any player conducts a transaction on one of hte chest shop signs, their eco balance is REPLACED with their points balance from that point forward.

commented

Boss Shop / Boss Shop Pro / CMI / Jobs... Jobs is a good example since it uses both money AND points... though I've never enabled the points in that plugin.

As far as I can tell those plugins add individual support for a certain set of other economy plugins to be used as "points" instead of going through a centralised economy adapter like Vault. That is not a solution for ChestShop, adding support for tons of random plugins is not feasible in the long run.

Interestingly - I have a plugin: CommandSigns - no longer in development but still extremely useful - supports $ but DOES NOT support points for currency.

Well it most likely simply uses Vault and your points plugins aren't providing a Vault economy provider.

WORSE than that, if any player conducts a transaction on one of hte chest shop signs, their eco balance is REPLACED with their points balance from that point forward.

ChestShop is not responsible for third party plugins not properly handling economy transactions. All that ChestShop does is call Vault's economy addition or subtraction method, what your other plugins do with that call is up to them.

commented

Problem is that since your signs don't specify a currency, they now accept and send only points due to another plugin that doesn't use a currency symbol making changes. So I'm pretty sure this STILL means you have to specify a default currency to use in this plugin, since now you're using a different currency simply by not specifying one. For example, Essentials signs specify $ and so $ are still used, and are unaffected by the changes of another currency plugin. Seems to me this is still a config-level fix.

commented

ChestShop simply uses the Vault economy provider with the highest priority. Vault has no concept of a "currency" or "symbols".

commented

Exactly: Vault has no concept of "currency", this is why Chestshop needs to. Also, I'm not sure you're correct since Essentials signs uses currency symbols and manages to make transactions with dollars ($10) and Vault just fine.

commented

It is impossible for ChestShop to support it when the economy abstraction system (in this case Vault) does not support it.

commented

Well other plugins support currencies and vault at the same time, so you're clearly wrong about that being "impossible".

commented

Well if there is an easy and universal way to do that then I am obviously open to that, but I am not aware of a single plugin that manages to do that while still using an abstraction provider instead of adding support for every single economy plugin in existence. Feel free to provide examples but Essentials is definitely not one of them: It simply uses its own Economy or the one provided by Vault, not some other plugins.

commented

Boss Shop / Boss Shop Pro / CMI / Jobs... Jobs is a good example since it uses both money AND points... though I've never enabled the points in that plugin.

Interestingly - I have a plugin: CommandSigns - no longer in development but still extremely useful - supports $ but DOES NOT support points for currency.