Skip to content

Fix removing negative items in /clearinventory - #5899

Merged
JRoy merged 2 commits into
EssentialsX:2.xfrom
Evidentsinger14:fix/clearinventory
Aug 11, 2024
Merged

Fix removing negative items in /clearinventory#5899
JRoy merged 2 commits into
EssentialsX:2.xfrom
Evidentsinger14:fix/clearinventory

Conversation

@Evidentsinger14

Copy link
Copy Markdown
Member

Information

This PR fixes#5894

Details

Proposed fix:
ensure amount of removed items is not less than -1 (-1 clears all items of that type)

Environments tested:

OS: Windows 10

Java version: 21.0.3

  • [ x ] Most recent Paper version (1.21)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:
before:
image

after:
image

@Evidentsinger14Evidentsinger14 changed the title ensure amount of items is positive.Fix removing negative items in /clearinventoryAug 11, 2024
@JRoy
JRoy self-requested a review August 11, 2024 14:41
@JRoy
JRoy merged commit b763fd3 into EssentialsX:2.xAug 11, 2024
@Evidentsinger14
Evidentsinger14 deleted the fix/clearinventory branch August 11, 2024 14:45
Euphillya added a commit to Euphillya/Essentials-Folia that referenced this pull request Aug 13, 2024
EssentialsX@b763fd3 Fix removing negative items in /clearinventory (EssentialsX#5899)
EssentialsX@7ae01a0 Update to Minecraft 1.21.1 (EssentialsX#5900)
EssentialsX@f1a5caf Fixes wording on CannotRemoveNegativeItems (EssentialsX#5901)
@mdcfemdcfe added this to the 2.21.0 milestone Sep 15, 2024
Starmism pushed a commit to valence-smp/Essentials that referenced this pull request Jan 8, 2025
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
rewsdjad1 pushed a commit to rewsdjad1/EssentialsXPlus that referenced this pull request Aug 13, 2026
EssentialsX@b763fd3 Fix removing negative items in /clearinventory (EssentialsX#5899)
EssentialsX@7ae01a0 Update to Minecraft 1.21.1 (EssentialsX#5900)
EssentialsX@f1a5caf Fixes wording on CannotRemoveNegativeItems (EssentialsX#5901)
rewsdjad1 pushed a commit to rewsdjad1/EssentialsXPlus that referenced this pull request Aug 13, 2026
Co-authored-by: JRoy <10731363+JRoy@users.noreply.github.com>
Sign up for freeto 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.

Items duplication using /clear

3 participants

@Evidentsinger14@JRoy@mdcfe