Skip to content

Fix oversized kit leftovers being dropped unsplit#6580

Open
BD9a wants to merge 1 commit into
EssentialsX:2.xfrom
BD9a:fix-kit-leftover-drop-splitting
Open

Fix oversized kit leftovers being dropped unsplit#6580
BD9a wants to merge 1 commit into
EssentialsX:2.xfrom
BD9a:fix-kit-leftover-drop-splitting

Conversation

@BD9a

@BD9a BD9a commented Jun 24, 2026

Copy link
Copy Markdown

Information

This PR fixes #6579.

Details

Proposed fix:

Split kit leftovers before dropping them into the world.

When drop-items-if-full is enabled, leftover kit items may already be normalized into oversized internal ItemStacks. The fix clones each leftover stack and drops it in chunks no larger than the item's normal max stack size instead of passing the original leftover stack directly to dropItemNaturally.

This preserves the existing inventory insertion behavior, but prevents oversized leftover stacks such as OBSIDIAN x128 from becoming item entities.

Environments tested:

OS: Linux

Java version: 25.0.3

  • Most recent Paper version (1.21.4, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8
  • CraftBukkit/Spigot/Paper 1.21.4

Demonstration:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kit leftover items dropped on the ground are not splitted.

1 participant