[SPIGOT-8010] 'Control+Drop' When Denied Halts Server Created: 18/Feb/25  Updated: 22/Feb/25  Resolved: 22/Feb/25

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

Type: Bug Priority: Minor
Reporter: ItsSchatten Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: crash

Attachments: File 2025-02-17-12.log.gz     File Test-1.0-SNAPSHOT-all.jar     Text File crash-2025-02-17_01.02.15-server.txt    
Version: 4438-Spigot-d421948-ade46cc
Guidelines Read: Yes

 Description   

Using a mod called [Inventory Essentials|https://modrinth.com/mod/inventory-essentials] (in my test cases fabric version 21.4.3 [at the time of writing the latest]), which provides "a few inventory control enhancements that have initially been introduced in mods like Inventory Tweaks and Mouse Tweaks" can halt the server when a PlayerDropItemEvent is cancelled when using the Control+Shift+Drop enhancement.

According to this issue] all the mod does is "emulate Vanilla slot clicks".

The server appears to get caught in an infinite loop which I cannot replicate on other server software, only on Spigot.

 

Reproduction steps:

1. Install Fabric or (Neo)Forge and install the Inventory Essentials Mod.

2. Create a (or use the provided) plugin which simply denies the ability to drop items without the player sneaking.

public class TestPlugin extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onItemDrop(final PlayerDropItemEvent event) {
        if (!event.getPlayer().isSneaking()) {
            event.setCancelled(true);
        }
    }

} 

3. Launch a server with the plugin installed.

4. Obtain any item and attempt to drop it using Control + Shift + <Your Drop Key>

5. The server should hang before eventually exiting for running too far behind.

 



 Comments   
Comment by md_5 [ 22/Feb/25 ]

Resolved in 4440

Comment by ItsSchatten [ 22/Feb/25 ]

Quick update to this:

This may be caused by attempting to drop a full stack of items instead of what I originally thought of as the mod attempting to drop an item multiple times.

In the provided video I am playing on a Vanilla client on a Spigot 4439 server with the same plugin as provided above. Strangely enough this only occurs while dropping the items from the inventory and while in survival.

https://www.youtube.com/watch?v=OFDouOR9agE

Generated at Sun Mar 30 02:41:50 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.