Shopkeepers

Shopkeepers

2M Downloads

Transaction (goods & services) tax

liam-macann opened this issue ยท 2 comments

commented

Many countries have goods and services taxes, which are added onto the initial price and used to fund government initiatives. I would like a way to automatically increase sell prices by a set percentage tax, with this increase directed into a chest.

To combat rounding issues with lower value transactions (eg. 10% of 1 emerald), this could be calculated as a running shopkeeper total, with items taken from the player chest input when a whole value is reached.

Behaviour

  • Player creates sell/book shopkeeper and sets prices, as plugin currently allows
  • When the shopkeeper is accessed, the traded values are shown higher than that which the player set
  • The player receives the value they set initially, and the remainder is deposited in a secondary chest
  • This chest is accessed by all shopkeepers, and must be set to allow taxation
    • Due to the universal nature, this would clearly require either a set of hoppers, or a plugin system to set multiple chests
commented

There is already a 'tax-rate' setting.

Instead of applying it on top of the player's set price, it gets applied to the player's earning. This is easier to implement than adjusting the prices.

With setting 'tax-round-up' you can control whether to round up or down.
I could consider storing a running remaining tax value per player shop to deal with taxes of low value transactions. The (small) disadvantage of that would be that one can no longer directly associate a certain tax value per trade, since it will then also depend on the previous trades of that shop. If the shop gets deleted, any remaining tax would get ignored. The alternative would be to store this value per player. Then the remaining tax would get ignored once the player's data gets removed (eg. maybe once all shops got removed, or after a certain time of inactivity, or never if the player data is kept around indefinitely).

Since those 'taxes' go to the server, there is no feature to deposit them in a 'secondary universal chest'. If you need to figure out the concrete amount of taxes that got collected, you will need to hook into Shopkeepers' API, listen to trade events and keep track of this yourserlf.

commented

Thank you for the quick response.

On our server, we were looking to use collected tax as funding for infrastructure projects (rather than as a 'gold sink'). I'll definitely have a look at the API; I'm far from a Java dev, but this doesn't seem outside the realm of possibility. This is by far the best shop plugin available (no competition), so I'm determined to make it work for us.