Package ch.njol.skript.lang.util
Class SectionUtils
java.lang.Object
ch.njol.skript.lang.util.SectionUtils
Utility methods for working with 
Sections and SectionExpressions.- 
Method SummaryModifier and TypeMethodDescriptionstatic @Nullable TriggerloadLinkedCode(String name, BiFunction<Runnable, Runnable, Trigger> triggerSupplier) This method is used for loading a section into aTriggerunder different context (Events).
- 
Method Details- 
loadLinkedCode@Nullable public static @Nullable Trigger loadLinkedCode(String name, BiFunction<Runnable, Runnable, Trigger> triggerSupplier) This method is used for loading a section into aTriggerunder different context (Events). However, unlike the traditional methods such asSection.loadCode(SectionNode, String, Runnable, Runnable, Class[]), this method assumes some level of linkage between the returned trigger and the section it was loaded from. These assumptions are:- Local variables (and at parse time, type hints) will be shared between the two sections.
- Delays within the trigger are not permitted.
 Variables.withLocalVariables(Event, Event, Runnable)- Parameters:
- name- The name of the section being loaded.
- triggerSupplier- A function to load code using a trigger. The function has two runnable arguments. When using a method like- Section.loadCode(SectionNode, String, Runnable, Runnable, Class[]), the runnable arguments represent the parameters- beforeLoadingand- afterLoading, respectively. It is imperative that these runnable arguments be passed. If the method you are using does not support those arguments, use a different method.
- Returns:
- The result of triggerSupplier, or null if some issue occurred.
 
 
-