Skip to content

Possible item loss when cancelling PlayerDropItemEvent #7726

@aerulion

Description

@aerulion

Expected behavior

Assuming a player stands inside a pile of dropped items, then starts moving an item in his inventory with his cursor and thereby filling the empty slot with any of the dropped items. If the player now clicks outside his inventory to drop the cursor item, the event should get cancelled and the item should remain attached to the cursor.

Observed/Actual behavior

When clicking outside the inventory the item will simple get deleted if the players inventory is full.

Steps/models to reproduce

  1. Cancel all PlayerDropItemEvents.
  2. Stand in a pile of dropped items with a full inventory.
  3. Move an item in your inventory with your cursor.
  4. Click outside the inventory in order to drop the item.
  5. Watch the item being deleted.

Plugin and Datapack List

Just a test plugin cancelling the event.

Paper version

This server is running Paper version git-Paper-283 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: f8e8d6c)
You are running the latest version
Previous version: git-Paper-277 (MC: 1.18.2)

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.version: 1.19Game version 1.19

    Type

    No fields configured for Bug.

    Projects

    Status

    ✅ Accepted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions