Fix CombatTracker stale on death#12562
Conversation
|
not sure also if maybe is better just make the get in the Craft clalss build the wrapper every time for avoid this edge case. but the fixs works. |
|
Yea I think recreating the instance is a fine alternative. Alternatively, the nms CombatTracker could hold its own API view (similar to Entity's getBukkitEntity) and we return that. |
Then i can add the wrapper in the nms class like the bukkit entity and use that. |
|
Was there anything else that needed to be added or is it just waiting for a review? |
Fix #12558 where player replace the combattracker on death, this PR make the PaperCombatTrackerWrapper part of the NMS CombatTracker for avoid stale instances.