I wrote one afternoon and failed. I want to implement the party of the mcmmo plugin items share. A player picks drop items and randomly assigns or evenly distributes the item. How to do?
PlayerPickupItemEvent will be fired uppon an item of X amount being picked up. The amount can be either (full) 16 or 64 as far as I'm aware. Simply check if the amount is not 1 then cancel the event, remove the item and afterwards loop through all the parties and give them an amount of itemAmount/patyMembers. You should keep the remaining amount each loop and not use the first values so as to avoid giving more items than there is available.
Sharing the solution and marking the thread as solved would be useful for other users with the same issue.
Doesn't matter much. It'll still be useful. Well, I'm not forcing you to share it, however it would be valuable for many.