[SPIGOT-2728] PistonRetractEvent has wrong direction for non-sticky pistons. Created: 13/Oct/16  Updated: 13/Oct/16  Resolved: 13/Oct/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Michael G. Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates SPIGOT-822 the BlockPistonRetractEvent BlockFace... Open

 Description   

When a non-sticky piston retracts, BlockPistonRetractEvent#getDirection() of the relevant event returns the BlockFace of the piston itself instead of the movement direction.

When a sticky piston retracts, it correctly returns the movement direction.



 Comments   
Comment by Michael G. [ 13/Oct/16 ]

I suggest deprecating the getDirection() method and moving this functionality to a new one so that already used workarounds won't break after fixing this.

Generated at Sat Dec 13 15:21:28 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.