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
FieldsFields inherited from class ch.njol.skript.lang.TriggerSection
first, lastFields inherited from class ch.njol.skript.lang.TriggerItem
parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExit the loop, used to reset the loop properties such as iterations counterabstract TriggerItemlonggetLoopCounter(Event event) Methods inherited from class ch.njol.skript.lang.Section
init, init, loadCode, loadCode, loadCode, loadOptionalCode, parseMethods inherited from class ch.njol.skript.lang.TriggerSection
run, setNext, setParent, setTriggerItems, walk, walkMethods inherited from class ch.njol.skript.lang.TriggerItem
debug, getIndentation, getNext, getParent, getTrigger, toString, walkMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.njol.skript.lang.Debuggable
toString, toStringMethods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser, init
-
Field Details
-
currentLoopCounter
-
-
Constructor Details
-
LoopSection
public LoopSection()
-
-
Method Details
-
getLoopCounter
- Parameters:
event- The event where the loop is used to return its loop iterations- Returns:
- The loop iteration number
-
getActualNext
- Returns:
- The next
TriggerItemafter the loop
-
exit
Exit the loop, used to reset the loop properties such as iterations counter- Specified by:
exitin interfaceSectionExitHandler- Parameters:
event- The event where the loop is used to reset its relevant properties
-