WorldGuard/worldguard-bukkit
Lennart 7783e9ae3b
Fix ItemStack conversion on block place on MC 1.21 (#2093)
* Fix ItemStack conversion on block place

This issue is present in 1.21 because some materials do not convert 1:1 to item types.
This throws an exception in the ItemStack constructor.
Example: WALL_TORCH is a valid block but not a valid item, only TORCH is a valid item.

So, use the item in hand instead, creating a copy with quantity set to 1, for issueing the
use item event.

* Use ItemStack as-is.

Closes #2092.

---------

Co-authored-by: wizjany <wizjany@gmail.com>
2024-06-19 12:00:35 -04:00
..
contrib Bump to 7.0.0. Rename -legacy to -bukkit. 2019-06-11 22:32:04 -04:00
src/main Fix ItemStack conversion on block place on MC 1.21 (#2093) 2024-06-19 12:00:35 -04:00
build.gradle.kts Fix compilation for MC 1.21. Nothing tested yet. 2024-06-16 21:48:35 -04:00