Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

EntityDropItemEvent is not fired for item frame drops

未关闭
#14,424 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java

调研方向

Start by tracing HangingEntity#spawnAtLocation and compare it with the Entity#spawnAtLocation event-firing path described in the issue. Reproduce the four item-frame cases using the attached plugin source and output. Done means establishing whether hanging-entity drops should fire EntityDropItemEvent and, if so, verifying it fires for the frame and its contents.

由索引模型根据 Issue 内容生成。

描述

status: needs triage version: 26.3
Expected behavior

Should EntityDropItemEvent fire for the frame item and its contents, with the frame as the source? Or are hanging entities intentionally excluded?

Observed/Actual behavior

Destroying an item frame with an explosion fires HangingBreakEvent and ItemSpawnEvent, but no EntityDropItemEvent.

Reproduced for normal and glow item frames, both empty and containing a diamond. Empty frames produce one item drop; filled frames produce two. EntityDropItemEvent fires zero times in all four cases.

Steps/models to reproduce
  1. Extract the attached reproduction archive.
  2. Put frame-drop-probe.jar in plugins/ on a fresh Paper test server with a new world.
  3. Start the server and read the console or plugins/FrameDropProbe/result.txt.

The plugin creates and destroys all four frame variants automatically with World#createExplosion(location, 3.0f, false, false). It uses only the Bukkit API, with no NMS or manually dispatched events. The archive includes the source and test output.

frame-drop-reproduction.zip

Plugin and Datapack List

Only FrameDropProbe 1.0. Datapacks: vanilla (built-in), paper (built-in).

Paper version
This server is running Paper version 26.3-222-main@e3ba7b1 (2026-10-24T13:18:21Z) (Implementing API version 26.3.build.222-stable)
You are running the latest version

Java: Eclipse Adoptium Temurin 25.0.4.1+1-LTS, macOS aarch64.

Other

HangingEntity#spawnAtLocation calls addFreshEntity directly, bypassing the Entity#spawnAtLocation overload that fires EntityDropItemEvent.

Is this intentional, or should hanging-entity drops use the event-firing path?

主要语言
Java
星标
12.8k
派生
3.6k
平均合并
4 天 13 小时
30 天内合并 PR
46

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PaperMC/Paper 的其他 Issue

查看 PaperMC/Paper 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。