NiklasEi / gamebox

Minecraft plugin with a vast selection of inventory games
http://gamebox.nikl.me
GNU General Public License v3.0
17 stars 12 forks source link

A suggestion #22

Closed I2000C closed 6 years ago

I2000C commented 6 years ago

Hi, do you remember me? A long time ago you solved a big problem related to the compatibility of bukkit in your plugin and that was a great help for me. Now I would like to ask you if it would be possible, in any way, that the "tokens" that you win can be exchanged for money with an economy plugin, through some option to introduce command in the objects of the store or similar. Greetings and good luck with version 2.0.

NiklasEi commented 6 years ago

That is possible and a great idea, thank you.

NiklasEi commented 6 years ago

Looking at this again, it is quite easily done with the current system. Since you can give money per command for most economy plugins, you can use a shop item to "sell" money for token.

The following is an example shop item that gives a player 100 money for one token. With the current system it is also possible to add buttons that give more money for bulk selling of tokens or sell token for money via the gamebox admin commands. The example uses a command of SaneEconomy. If you are using a different economy plugin you'll have to change that of course.

        sellOneToken:
          tokens: 1
          buttonItem:
            materialData: "gold_ingot"
            displayName: "&9&lSell one token"
            additionalLore:
            - " "
            - "&1Exchange one token for 100 money"
          commands:
          - "ecoadmin give %player% 100"