Open HydrolienF opened 1 week ago
I cannot replicate this issue on 4d20922b79f5b3976e240932d087357a3808fde4. Cancelling the block place event works fine in. The item is reverted to its original count.
Closing this as I'd presume more people would have reported this. If you have more input or more specific replication steps, feel free to post them here, I'll gladly reopen the issue 👍
I did more tries with I and, it still happend in paper 1.21.46. It only happend on the 4 chunks around 0,0. That's probaby why the bug havent been found before.
This is a video of me testing it https://youtu.be/iKC1voGuaDs
Sounds like a spawn protections issue, will triage tomorrow if no one beats me to it.
Thanks for the replication steps!
If you think it's a Towny issue, let me know, I will open an issue there.
Thanks for the replication steps!
No problem
After installing latest towny, I still cannot replicate this. You are using the vanilla client yes?
Yes, vanilla 1.21 client, Paper 1.21.46 & Towny 0.100.3.4. With default settings for Paper and Towny. Java 21 Temurin.
Okay yea, this is not related to the event at all. Spawn protection is simply failing 👍 I can replicate this by
Create new paper server Add operator so spawn protection activates Attempt to place block.
Notably, until this is fixed, I'd advise against using spawn protection in the first place, it's consistency is questionable. You can disable it by setting the spawn-protection radius to 0 in the server.properties. If you want to correctly protect regions, checkout plugins for it like WorldGuard.
Thanks. I forget to say that I had op one of my 2 account before trying with the other one. I have disable spawn protection on my server.
This is a vanilla issue (https://bugs.mojang.com/browse/MC-99075) that spigot try to fix at some point here: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/item/ItemStack.patch#189
Expected behavior
When a BlockPlaceEvent is canceled it should display the same amount of item in the player inventory as if no block where placed.
Observed/Actual behavior
Currently in paper-1.21-40 item isn't visible in the player inventory after the BlockPlaceEvent have been canceled. It's only a display bug, moving the item inside the inventory will show the right number of block back.
Steps/models to reproduce
Plugin and Datapack List
I have tried with towny and flagsh, both have the same behavior.
Paper version
[21:32:38 INFO]: This server is running Paper version 1.21-40-master@b45d9b6 (2024-07-01T08:23:14Z) (Implementing API version 1.21-R0.1-SNAPSHOT) You are running the latest version
Other
No response