Package ch.njol.skript.lang
Class LoopSection
java.lang.Object
ch.njol.skript.lang.TriggerItem
ch.njol.skript.lang.TriggerSection
ch.njol.skript.lang.Section
ch.njol.skript.lang.LoopSection
- All Implemented Interfaces:
Debuggable
,SectionExitHandler
,SyntaxElement
public abstract class LoopSection
extends Section
implements SyntaxElement, Debuggable, SectionExitHandler
Represents a loop section.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.njol.skript.lang.Section
Section.SectionContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class ch.njol.skript.lang.TriggerSection
first, last
Fields inherited from class ch.njol.skript.lang.TriggerItem
parent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
exit
(org.bukkit.event.Event event) Exit the loop, used to reset the loop properties such as iterations counterabstract TriggerItem
long
getLoopCounter
(org.bukkit.event.Event event) Methods inherited from class ch.njol.skript.lang.Section
init, init, loadCode, loadCode, loadCode, loadOptionalCode, parse
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, toString
Methods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser, init
-
Field Details
-
currentLoopCounter
-
-
Constructor Details
-
LoopSection
public LoopSection()
-
-
Method Details
-
getLoopCounter
public long getLoopCounter(org.bukkit.event.Event event) - Parameters:
event
- The event where the loop is used to return its loop iterations- Returns:
- The loop iteration number
-
getActualNext
- Returns:
- The next
TriggerItem
after the loop
-
exit
public void exit(org.bukkit.event.Event event) Exit the loop, used to reset the loop properties such as iterations counter- Specified by:
exit
in interfaceSectionExitHandler
- Parameters:
event
- The event where the loop is used to reset its relevant properties
-