PaperMC / PaperMC/Paper

PlayerStonecutterRecipeSelectEvent not firing on API-created inventories

Open
#5,825 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #7265 by @Machine-Maker — closed without merging
status: accepted type: bug version: 1.16
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

When creating a Stonecutter inventory like so:

Inventory inventory = Bukkit.createInventory(null, InventoryType.STONECUTTER);

PlayerStonecutterRecipeSelectEvent is never fired for API-created inventories.

Observed/Actual behavior

The event is not fired.

Steps/models to reproduce
  1. Create a listener that listens on PlayerStonecutterRecipeSelectEvent.
  2. Create a Stonecutter inventory using Bukkit#createInventory
  3. Recipes selected within this inventory will not fire the event.
Plugin list

Just a basic test plugin.

Paper version

This server is running Paper version git-Paper-777 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
You are running the latest version
Previous version: git-Paper-775 (MC: 1.16.5)

Agreements
  • I am running the latest version of Paper available from https://papermc.io/downloads.
  • I have searched for and ensured there isn't already an open issue regarding this.
  • My version of Minecraft is supported by Paper.
Other

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Bukkit#createInventory path for InventoryType.STONECUTTER and compare it with the path used for player-created stonecutters, then trace where PlayerStonecutterRecipeSelectEvent is dispatched. Reproduce the issue with a listener and an API-created inventory; done means recipe selection fires the event there as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.