Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Create SectionExitHandler interface

Open takejohn opened this issue 1 year ago • 1 comments

Description

  • Add an interface SectionExitHandler, having one method exit(Event).
  • Change LoopSection to implement this.
  • Change the 'exit' and 'return' effects to check if the enclosing nodes are SectionExitHandlers instead of checking for LoopSections.

This PR enables addons to add sections which don't need to hold loop counters doing something when exited.


Target Minecraft Versions: any Requirements: none Related Issues: none

takejohn avatar Jan 20 '24 15:01 takejohn

I'm not sure about the name. What do you think about something like ExitableSection

APickledWalrus avatar Jan 20 '24 16:01 APickledWalrus

Thanks for this!

APickledWalrus avatar Mar 09 '24 20:03 APickledWalrus