snowgears / shopbugs

Shop bug tracker
8 stars 4 forks source link

[Feature Request] Virtual Storage Shop #388

Open TetraTheta opened 1 year ago

TetraTheta commented 1 year ago

Is your feature request related to a problem? Please describe.

To explain this feature request, I should tell you about my story first.

Currently, the Shop plugin only cares about actual containers inside the world. A single chest or barrel can only have 27 stacks of items, and a double chest can only have 54 stacks of items.   If the shop's owner wants to deposit more than 54 stacks or 54 items (for non-stackable items), if I remember correctly, he can't. 

Using the hopper for restocking can be done, but the hopper and chest are not protected by the Shop plugin, so WorldGuard or any other similar plugin is required for securing them.

I recently experienced another shop plugin, Shopkeepers in my friend's server. When you Shift + Right Click on the "Shopkeeper NPC," a double chest inventory appears for editing sales item count, price, and so on. I liked the idea, even though Shopkeeper still uses actual chests or barrels for its shop inventory.

Describe the solution you'd like

If you want to create a "virtual storage shop", start with an empty chest because right-clicking the chest will display customized double chest inventory rather than original inventory. After you create a "virtual storage shop", you can deposit many items in the shop's virtual storage; you can deposit items more than 54 (with pagination); you can deposit almost an infinite quantity of each item (until Integer.MAX_VALUE I guess? ); you can check each item's count, etc.

If the shop's owner breaks the chest, the plugin modifies drop items and "drops" every item in the virtual storage.

Describe alternatives you've considered

I didn't think about any other alternatives.

Image gallery

I made brief, lazily created images about what it would look like. They're not particularly impressive or beautiful, but here they are.
IMGUR Gallery

Since I put every suggestion about how it would work in that gallery, it is advised to take a look at that gallery.