Well, I have been thinking of a way to make investing in a chest shop possible. The way I see this possible is in 2 ways. Firstly, you can do it manually when the first person pays what they pay and the second person right clicks the chest shop with a stick. Doing this will say in the chat. "How many percent of this chest shop will you be giving". After answering, it will say "To whom will you be giving this to".
The second way would be
/invest as the main command. Couple commands associated with it would be:
/invest check ***Shows the offer and amount of items in the chest shop in a gui.***
/invest request (% of chest shop wanting) (What you're willing to pay) *** left click chest you want after! Requests the investing offer to the chest left clicked after offering***
/invest offer (% of chest shop giving) (What you're asking for) (Player offering to) ***left click chest you want to offer the percent of after. Offers the percent of the chest shop to the player typed in.***
/invest cancel ***Cancels your offer***
/invest deny *** Denies a offer***
/invest accept ***Accepts offer at price given***
/invest counter (% wanting/giving) (Meebles wanting/giving) ***Wanting/Giving depending if you're Giving partnership or asking for partnership***
When you /invest check, and there is let's say, 3 stacks of iron in the chest shop and you are getting offered 1/3 of the shop. When you accept the offer, if the shop ever gets broken or taken from, the owner cannot take the 1 stack cause it it technically yours in their shop.
Ask questions below! Thanks :)