Make armorstand interactions cancelable #167
Labels
No labels
API
Addon Request
Bug
Duplicate
Enhancement
Feature Request
High Priority
Hybrid Software
Incompatibility
Invalid
Legacy
Low Priority
Missing Information
Needs Confirmation
Possible with API
Question
Won't Fix
v2
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: SBDevelopment/VehiclesPlus#167
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your enhancement related to a problem? Please describe.
As of now, when clicking on a seat of a vehicle - the action can not be cancelled and is fired anyways.
Describe the solution you'd like
One option is adding the "ignoreCancelled" to the listener listening to this specific event.
The other solution - adding Seat clicks to VehicleClickEvent and seperate the seats from the main body of the vehicle using an enum and adding the ability to cancel the event like this
I assume you are using the beta version of vehicleplusV3 and if so the VehicleClickEvent is something that is never fired in the latest beta and so it indeed doesn't work but in the next beta it should be working.
Using v2 for this one actually.
But for v3 it should be the same because cancelling the event of "PlayerIntetactAtEntity" isn't canceling the corresponding listener of VehiclesPlus both in v2 and v3
I am not planning to fix this for v2 anymore since the api is a mess and I don't think stijn wants to do it either so this is not happening, V3 is pretty much around the corner I am talking about weeks to a maximum of a few months.
The only thing I can tell you it's indeed the "PlayerInteractAtEntityEvent" that we fire to open those menus and you should be able to cancel it via that way if not it's not a bugg it something we can discuss further in development if you can't cancel it using that way
We use default priority indeed, so listen with higher priority and cancel it before we listen to it.
Re-opening this issue with SBDeveloper's approval
I checked and also googled about this -
If an event is not actively ignoring a cancelled event (using ignoreCancelled = true or custom checks) - it will get fired even if the event is cancelled regardless of the priority of the event that cancelled it.
Implemented in v3