Package ch.njol.skript.lang
Class EffectSection
java.lang.Object
ch.njol.skript.lang.TriggerItem
ch.njol.skript.lang.TriggerSection
ch.njol.skript.lang.Section
ch.njol.skript.lang.EffectSection
- All Implemented Interfaces:
Debuggable
,SyntaxElement
A
When loading code, all EffectSections should first verify whether a section actually exists through the usage of
Section
that may also be used as an effect,
meaning there may be no section to parse.
When loading code, all EffectSections should first verify whether a section actually exists through the usage of
hasSection
. If this method returns true, it is
safe to assert that the section node and list of trigger items are not null.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.njol.skript.lang.Section
Section.SectionContext
-
Field Summary
Fields inherited from class ch.njol.skript.lang.TriggerSection
first, last
Fields inherited from class ch.njol.skript.lang.TriggerItem
parent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
init
(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult) This method should not be overridden unless you know what you are doing!abstract boolean
init
(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult, @Nullable SectionNode sectionNode, @Nullable List<TriggerItem> triggerItems) static @Nullable EffectSection
parse
(String input, @Nullable String defaultError, @Nullable SectionNode sectionNode, @Nullable List<TriggerItem> triggerItems) Similar toSection.parse(String, String, SectionNode, List)
, but will only attempt to parse from otherEffectSection
s.Methods inherited from class ch.njol.skript.lang.Section
loadCode, loadCode, loadCode, loadOptionalCode
Methods inherited from class ch.njol.skript.lang.TriggerSection
run, setNext, setParent, setTriggerItems, walk, walk
Methods inherited from class ch.njol.skript.lang.TriggerItem
debug, getIndentation, getNext, getParent, getTrigger, toString, walk
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.njol.skript.lang.Debuggable
toString
Methods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser
-
Constructor Details
-
EffectSection
public EffectSection()
-
-
Method Details
-
hasSection
public boolean hasSection() -
init
public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult) This method should not be overridden unless you know what you are doing!- Specified by:
init
in interfaceSyntaxElement
- Overrides:
init
in classSection
- Parameters:
expressions
- all %expr%s included in the matching pattern in the order they appear in the pattern. If an optional value was left out, it will still be included in this list holding the default value of the desired type, which usually depends on the event.matchedPattern
- The index of the pattern which matchedisDelayed
- Whether this expression is used after a delay or not (i.e. if the event has already passed when this expression will be called)parseResult
- Additional information about the match.- Returns:
- Whether this expression was initialised successfully. An error should be printed prior to returning false to specify the cause.
- See Also:
-
init
public abstract boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult, @Nullable @Nullable SectionNode sectionNode, @Nullable @Nullable List<TriggerItem> triggerItems) -
parse
@Nullable public static @Nullable EffectSection parse(String input, @Nullable @Nullable String defaultError, @Nullable @Nullable SectionNode sectionNode, @Nullable @Nullable List<TriggerItem> triggerItems) Similar toSection.parse(String, String, SectionNode, List)
, but will only attempt to parse from otherEffectSection
s.
-