[SPIGOT-6727] Creating ghost items using InventoryClickEvent.setCancelled(true) Created: 29/Aug/21  Updated: 02/Sep/21

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

Type: Bug Priority: Minor
Reporter: user-6b161 (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: GUI, InventoryClickEvent
Environment:

Windows 10 Pro


Attachments: File Spigot GUI Bug.jar    
Version: This server is running CraftBukkit version 3231-Spigot-3c1fc60-e167f28 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

This bug is easier to preform when you have a bad ping to the server.

By shift-clicking an item in a GUI menu where InventoryClickEvent is cancelled then instantly closing the menu with escape right after, you can get a ghost item.

The attached plugin adds a /gui command. Shift-click the gold block in the GUI then quickly close the GUI menu to get a ghost item.

Also here is a video for proof:

https://drive.google.com/file/d/1H5B9T3CRutMtr8Yk65niTPBRKbIRs5Ht/view?usp=sharing



 Comments   
Comment by user-6b161 (Inactive) [ 29/Aug/21 ]

You can fix this by creating a BukkitRunnable that runs every tick that loops through every player then runs updateInventory() on that player.

However doing this breaks the creative menu.

Generated at Tue Apr 15 11:10:11 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.