Is it possible to limit the size of a mules inventory? Also is it possible to limit which players can open the mules inventory
only way I could think of is to open a custom invetory when the player opens the mule inventory. that way you can manage the size and who is allowed to open it without a problem.
If you're going to have max the amount of slots a mule has, just store items in the mules inventory. Drops on death, too. If you're going to have more than the max amount of a vanilla mule, make a new Inventory instance and save the items. Get the entity ID or such, too, btw. Id rather just use the first slot of it's vanilla inventory to keep a stick or something with a displayname of it's UUID