Mwexim / skript-parser

A standalone and improved implementation of the Skript language for use outside of Minecraft servers.
MIT License
49 stars 15 forks source link

Add SkriptLogger in constructor of registration and a finish consumer API #145

Closed TheLimeGlass closed 11 months ago

TheLimeGlass commented 1 year ago

Add SkriptLogger in constructor of registration and a finish consumer API.

Allows for a consumer as a callback for when the SkriptRegistration finish. This can be useful to start executing or loading Scripts after all the syntaxes have been registered.

This pull also allows for setting the SkriptLogger in the consumer. This is because when registering syntaxes as i've found, the implementing SkriptAddon needs to be able to read it's own errors, rather than SkriptRegistration making a new SkriptLogger. There may be other details that are present in the provided SkriptLogger that the implementing class may need.

Also organized the fields to look pretty.