-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AddonModule#canLoad #7548
base: dev/feature
Are you sure you want to change the base?
AddonModule#canLoad #7548
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, much needed, good words, #7541 also completed in this
I'm against this simply because, if we desire to change this, it should be replaced with a most robust load order system. I do not think two loops is a major issue given it provides a basic load order system |
So you're just against the combining the two loops? If so, I can just undo that part alone, but I would believe a |
Yeah, the canLoad is fine. I would filter a list of the addon modules that can load, and use that for the two loops |
Okie dokie, all done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we think about shouldLoad
instead?
Description
This PR aims to add a default method
#canLoad(SkriptAddon)
withinAddonModule
allowing addon developers to specify conditions that need to be met in order for the addon to be loaded.This ensures an addon is not loaded when it should not or can't.
Also, combines the two for loops of
init
andload
into one loop because it simplifies it and there's no need to loop it twice.Target Minecraft Versions: any
Requirements: none
Related Issues: #7539