PaperMC / PaperMC/Paper

Placing book in Lectern fires block place event

Open
#9,759 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted type: bug
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

The JD for the block place event says Called when a block is placed by a player., so either for the event to not fire there or for the JD to be clarified.

Observed/Actual behavior

Whenever you place a book into a Lectern, a block place event is fired.

Steps/models to reproduce

This is using the Debuggery plugin (which is part of Paper's org), let me know if proper Java code is preferred.

  • /devent org.bukkit.event.block.BlockPlaceEvent
  • Right click an empty Lectern with a book
Plugin and Datapack List
> plugins
[23:44:43 INFO]: Server Plugins (1):
[23:44:43 INFO]: Bukkit Plugins:
[23:44:43 INFO]:  - Debuggery
> datapack list
[23:46:10 INFO]: There are 2 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)]
[23:46:10 INFO]: There are no more data packs available
Paper version
> version
[23:49:40 INFO]: Checking version, please wait...
[23:49:41 INFO]: This server is running Paper version git-Paper-196 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 773dd72)
You are running the latest version
Previous version: git-Paper-194 (MC: 1.20.1)
Other

Some Discord discussion if that's relevant.

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

Reproduce the behavior with Debuggery using /devent org.bukkit.event.block.BlockPlaceEvent, then place a book into an empty Lectern. Review the BlockPlaceEvent Javadoc and the Lectern interaction path to determine whether the event behavior or its documentation should change; done means the behavior and API contract agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.