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,RuntimeErrorProducer,SyntaxRuntimeErrorProducer
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, lastFields inherited from class ch.njol.skript.lang.TriggerItem
parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexit(org.bukkit.event.Event event) Exit the loop, used to reset the loop properties such as iterations counterabstract TriggerItemThis method guarantees to return nextTriggerItemafter this item.longgetLoopCounter(org.bukkit.event.Event event) Methods inherited from class ch.njol.skript.lang.Section
getNode, getSyntaxTypeName, init, init, loadCode, loadCode, loadCode, loadCode, loadOptionalCode, parse, preInitMethods inherited from class ch.njol.skript.lang.TriggerSection
run, setNext, setParent, setTriggerItems, triggerExecutionIntent, walk, walkMethods inherited from class ch.njol.skript.lang.TriggerItem
debug, executionIntent, 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 org.skriptlang.skript.log.runtime.RuntimeErrorProducer
error, error, getRuntimeErrorManager, warning, warningMethods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser, getSyntaxTypeName, init, preInitMethods inherited from interface org.skriptlang.skript.log.runtime.SyntaxRuntimeErrorProducer
getErrorSource
-
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
Description copied from class:TriggerItemThis method guarantees to return nextTriggerItemafter this item. This is not always the case forTriggerItem.getNext(), for example,getNext()of aloop sectionusually returns itself.- Overrides:
getActualNextin classTriggerItem- Returns:
- The next
TriggerItemafter 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:
exitin interfaceSectionExitHandler- Parameters:
event- The event where the loop is used to reset its relevant properties
-