Skip to content

Multiple InventoryClickEvent called instead of InventoryDragEvent in CREATIVE #10384

@seercle

Description

@seercle

Expected behavior

I expect InventoryDragEvent being called, as it does with other game modes

Observed/Actual behavior

When in creative, instead of calling InventoryDragEvent at the end of the drag as usual, one InventoryClickEvent is fired per slot dragged into

Steps/models to reproduce

public class DragIssuePlugin extends JavaPlugin implements Listener {

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

  @EventHandler
  public void onInventoryClick(InventoryClickEvent e){
    e.getWhoClicked().sendMessage("CLICK");
  }

  @EventHandler
  public void onInventoryDrag(InventoryDragEvent e){
    e.getWhoClicked().sendMessage("DRAG");
  }
}

Plugin and Datapack List

None except the one mentioned above

Paper version

This server is running Paper version git-Paper-464 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: e709245)
You are running the latest version
Previous version: git-Paper-"00fd87a" (MC: 1.20.4)

Other

This issue is likely related to #10377, as both are issues with InventoryClickEvent in creative

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution: works as intendedWorking as it should / expected totype: bugSomething doesn't work as it was intended to.

    Type

    No fields configured for Bug.

    Projects

    Status

    Invalid

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions