Named item groups in trade signs and commands
Strahan201 opened this issue ยท 1 comments
Feature description
If you have a bucket of cod, and you try to sell them with a sign like this:
[Sell]
1
cod
$5
It acts like you have no cod. If you have raw cod itself in your inv, it works. As there is a live "raw" cod in the bucket it would make sense for the sign to accept that as one raw cod and buy it. It could then swap the bucket of cod item in your inv for an empty bucket item.
How the feature is useful
It makes logical sense
Trade signs are currently intended to only recognise exact items. We wouldn't hardcode fish names to include selling buckets of said fish as this is very specific and limited.
It would be possible to add configurable named item groups, reading these from a new config section (or from material tags?). This would allow trade signs to match names on the sign to groups of items, and could be used to match item groups elsewhere in the plugin as well. We would need to consider how to do this without confusing existing users, possibly by requiring a prefix for groups (so /sell +fish
sells all the items that are in the fish
group).
This is currently a low priority for us, but I'll leave these thoughts here as someone may be interested in opening a PR later on.