[SPIGOT-7996] Cancelling EntityTransformEvent does not keep equipment Created: 19/Jan/25 Updated: 19/Jan/25 Resolved: 19/Jan/25 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Asteraoth | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Version: | 4424-Spigot-aa7842e-442838f (MC: 1.21.4) (Implementing API version 1.21.4-R0.1-SNAPSHOT) |
| Guidelines Read: | Yes |
| Description |
|
If a plugin cancels the EntityTransformEvent event, the equipment on the original entity will be lost as it goes to the transformed entity. How to reproduce:
Observed Results: EntityEquipment equipment = ((LivingEntity) event.getTransformedEntity()).getEquipment(); Bukkit.getLogger().info("ArmorContents: " + equipment.getArmorContents()); Bukkit.getLogger().info("ItemInMainHand: " + equipment.getItemInMainHand()); Bukkit.getLogger().info("ItemInOffHand: " + equipment.getItemInOffHand()); Expected Results: |