Enhance DropCommand to support item quantity#5664
Conversation
|
I'm not sure how to handle cases where |
Just send a message using |
I've thought about it, but maybe it's better to warn that fewer items were dropped than were specified |
|
I don't think that will be a good implantation |
|
I'm not sure about the command erroring if you don't have enough items. Even ignoring a bug it created, I feel like it would create more frustration if you want to drop so many items and the command fails because you are slightly underneath it - it would be smoother if it executed anyway and dropped what it could. I am happy to hear arguments against this though. |
I agree with giving warnings, but could you clarify which bug you're talking about? |
|
if you wanted to drop all of an item it would always fail, because the command passed in Integer.MAX_VALUE to the drop method and you always have less than that of an item |
(cherry picked from commit ffe3708)
Type of change
Description
The
DropCommandnow supports an optional amount argument, allowing players to drop a specific number of items instead of entire stacks. The dropping logic was refactored into a dedicateddropItemmethod for cleaner structure, andInvUtilsgained adropOnehelper to handle single-item drops.Related issues
Closes #4222
How Has This Been Tested?
out.mp4
Checklist: