[SPIGOT-6093] Can't change ItemStack in EntityPickupItemEvent Created: 20/Aug/20 Updated: 21/Aug/20 Resolved: 21/Aug/20 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Shane Bee | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Version: | git-Spigot-379750e-eaf0bac |
| Guidelines Read: | Yes |
| Description |
|
I noticed when fiddling around with some code, that the ItemStack can't be changed in an ItemPickupEvent. Test code: @EventHandler private void onDrop(EntityPickupItemEvent event) { Item item = event.getItem(); item.setItemStack(new ItemStack(Material.DIAMOND)); } When this is fired, nothing happens. Including a tester plugin if you wish to test. I'm going to work on a PR that can fix this issue. |
| Comments |
| Comment by Shane Bee [ 20/Aug/20 ] |
|
(in my mind I uploaded the plugin, but clearly didn't)
PR Submitted: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/732/overview |