[SPIGOT-2942] give command fires PlayerDropItemEvent, cancelling it causes Item Duplication Created: 20/Dec/16  Updated: 11/Mar/22  Resolved: 11/Mar/22

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Andre LeBlanc Assignee: Unassigned
Resolution: Fixed Votes: 3
Labels: None

Issue Links:
Duplicate
is duplicated by SPIGOT-5721 Cancelling the PlayerDropItemEvent Ca... Resolved

 Description   

This was reported over a year ago and closed as unable to reproduce: https://hub.spigotmc.org/jira/browse/SPIGOT-882

I was able to reproduce on the latest spigot build, as was another developer on #spigot

Server Logs with complete stack trace: http://pastebin.com/Hi4LAX8M

Plugin Source: http://pastebin.com/DMhLxJsy



 Comments   
Comment by Marvin Rieple [ 11/Mar/22 ]

Made a PR for this: craftbukkit#1029

Comment by md_5 [ 20/Dec/16 ]

Pretty difficult issue to fix and different than PlayerDropItemEvent

Comment by Chris Fehling [ 20/Dec/16 ]

This stack trace was me basically throwing an exception in the PlayerDropItemEvent that is happening when you use /give [player] [item] on a vanilla server without plugins except the one listening for this event.

A player receives what he asked for plus one extra item of the sort you asked for.

Ex: "/give SLiPCoR diamond_sword 2" gives you a stack of 2 and another 1

[Server thread/INFO]: This server is running CraftBukkit version git-Spigot-6f7aabf-c8ff651 (MC: 1.11) (Implementing API version 1.11-R0.1-SNAPSHOT)

I hope it helps to solve this strange issue.

Generated at Tue Apr 22 04:54:50 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.