mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
42fecd0a5f
The EntityResurrectEvent logic is supposed to locate a totem of undying in any of the interaction slots of the player inventory and then, if the called EntityResurrectEvent is not cancelled, shrink that item by 1, usually reducing it to zero. For this, the logic iterates over the items in the interaction slots and breaks out the loop if a totem of undying was found. However, even if no totem of undying was found, the iteration item stack variable remains as a refernce to the last interaction slot probed. Plugins uncancelling a EntityResurrectEvent, which is published pre-cancelled to listeners if no totem of undying could be found, would hence cause the server logic to shrink completely unrelated items found in, at the writing of this patch, the players off hand slot. This patch corrects this behaviour by only shrinking the item if a totem of undying was found and the event was called uncancelled. |
||
---|---|---|
.. | ||
api | ||
removed | ||
server |