PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.67k stars 2.25k forks source link

All PlayerEditBookEvent results are ignored. #2329

Closed BoomEaro closed 3 years ago

BoomEaro commented 5 years ago

What behaviour is expected:

Normal behavior of the event.

What behaviour is observed:

It seems that any action of the event is ignored on the server side. If you cancel the event with the method e.setCancelled (true); as well as use the maximum priority in the event, there will be no results, the player will be able to edit the book.

Steps/models to reproduce:

https://pastebin.com/Z8TXibyH

Plugin list:

Plugins (56): AdvBans, BigLogger, BlocksHub, Board, BufferStorage, BungeeTabListPlus, CES, Chairs, ChestCommands, Citizens, ClearLag, CoreProtect, CraftBook, CrazyDebuger, CreeperHeal, DupeFixer, EmptyWorldGenerator, Essentials, EssentialsChat, EssentialsSpawn, FastAsyncVoxelSniper, FastAsyncWorldEdit, goBrush, HolographicDisplays, ItemFixer, Itemizer, Jail, LuckPerms, Market, MenuMaker, Multiverse-Core, MyPet, Names, NoCheatPlus, OpenInv, PandaWire, PlayerUtils, PortalProtect, ProtocolLib, PvPAssistant, RegionTrade, Sentinel, ServerUtils, spark, SuperEffects, TradeAssistant, Vault, ViaVersion, VoxelSniper, WgAddon, WGExtender, WhiteLister, WorldBorder, WorldEdit, WorldGuard, WorldLister

Paper build number:

This server is running Paper version git-Paper-1615 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)

Anything else:

The same problem was not only in paper, but also in spigot at 1.13 and higher. However, I had a server only on spigot 1.12.2, and before the update to paper, the event was canceled. Now this does not happen on 1.12.2, and probably on the other versions is similar.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Machine-Maker commented 3 years ago

This seems to still be an issue in 1.16.4 build 311. I cancelled the PlayerEditBookEvent and the changes persisted.

jpenilla commented 3 years ago

Potential fix by @BillyGalbreath here: https://github.com/pl3xgaming/Purpur/blob/96319592fdabf899dd4b383bdb507e61eea924e4/patches/server/0167-Fix-PlayerEditBookEvent-not-saving-new-book.patch

aurorasmiles commented 3 years ago

Fixed in dc529c7a931a226c19a4a01dd37fce86082f1a16