Essentials: /sell exists but /buy does not?

Created on 12 Sep 2019  路  4Comments  路  Source: EssentialsX/Essentials

Feature request

Feature description
/sell exists to sell items/blocks from worth.yml, but /buy does not? Would like /buy to be implemented, essentially the reverse of /sell

How the feature is useful
Command based economies are super useful and are missing /buy. Instead of being forced to create sign shops, /buy would allow servers to have players purchase items/blocks.
Of course, also have the option to disable either of the commands to force a sign shop only server.
edit: permissions can probably solve this

open to PR enhancement

Most helpful comment

I have a branch in progress for this. Latest commit is here:

https://github.com/mcglonelevi/Essentials/commit/91371abf8a368aa99b7478d2a0bfaaeb41441001

It looks like most of the code in Worth.java and other places in the code are meant for selling. I will need to re-implement some of the helper functions for the purposes of buying. Also, I will need to add translations to the files and all of that.

Still a long way off, but I figured I would share.

If someone sees this who wants to take over development and is more familiar with Spigot/Java than me, please feel free to commandeer.

All 4 comments

This would take the load off of a few other plugins, and would allow Essentials to replace several shop plugins if a GUI isn't necessary.

This is a +1 from me, a long-time user of Essentials (before it was even EssentialsX).

I have a branch in progress for this. Latest commit is here:

https://github.com/mcglonelevi/Essentials/commit/91371abf8a368aa99b7478d2a0bfaaeb41441001

It looks like most of the code in Worth.java and other places in the code are meant for selling. I will need to re-implement some of the helper functions for the purposes of buying. Also, I will need to add translations to the files and all of that.

Still a long way off, but I figured I would share.

If someone sees this who wants to take over development and is more familiar with Spigot/Java than me, please feel free to commandeer.

I have a PR up for this here:

https://github.com/EssentialsX/Essentials/pull/2795

Please let me know if you have any feedback in regards to how this command should function. If you are a developer, please look over my work and give feedback.

Wouldn't this require a config option to like increase the price based on the worth.yml? Like 2x more than set in worth.yml or something like that?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MithrandirCraft picture MithrandirCraft  路  3Comments

TheMattVid picture TheMattVid  路  3Comments

TheNety picture TheNety  路  3Comments

zuhir picture zuhir  路  3Comments

HexedHero picture HexedHero  路  3Comments