Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

/sell exists but /buy does not?

Open Keeevini opened this issue 6 years ago • 6 comments

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

Keeevini avatar Sep 12 '19 21:09 Keeevini

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).

Omio avatar Sep 13 '19 11:09 Omio

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.

mcglonelevi avatar Sep 26 '19 00:09 mcglonelevi

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.

mcglonelevi avatar Sep 26 '19 02:09 mcglonelevi

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?

BitesizedLion avatar Nov 06 '19 20:11 BitesizedLion

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?

I would prefer if there was a completely separate cost.yml so that way you have the ability to make different items have different buy back fees or even make it so some items can only be sold but not bought and vice versa

Benjamin5678 avatar Apr 25 '22 19:04 Benjamin5678

I think it would be better to have a prices.yml and define both worth and cost in the same file.

kennyrkun avatar Jun 04 '22 08:06 kennyrkun