Package ch.njol.skript.lang
Interface ExecutionIntent
- All Superinterfaces:
Comparable<ExecutionIntent>
- All Known Implementing Classes:
ExecutionIntent.StopSections
,ExecutionIntent.StopTrigger
public sealed interface ExecutionIntent
extends Comparable<ExecutionIntent>
permits ExecutionIntent.StopTrigger, ExecutionIntent.StopSections
Used to describe the intention of a
TriggerItem
.
As of now, it is only used to tell whether the item halts the execution or not and print the appropriate warnings.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Represents a stop sections intent.static final class
Represents a stop trigger intent. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionIntent.StopSections
Creates a new stop sections intent with a depth of 1.static ExecutionIntent.StopSections
stopSections
(int levels) Creates a new stop sections intent.static ExecutionIntent.StopTrigger
Creates a new stop trigger intent.@Nullable ExecutionIntent
use()
Uses the current ExecutionIntent.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
stopTrigger
Creates a new stop trigger intent.- Returns:
- a new stop trigger intent.
-
stopSections
Creates a new stop sections intent.- Parameters:
levels
- the number of levels to stop.- Returns:
- a new stop sections intent.
- Throws:
IllegalArgumentException
- if the depth is less than 1.
-
stopSection
Creates a new stop sections intent with a depth of 1.- Returns:
- a new stop sections intent.
-
use
Uses the current ExecutionIntent.- Returns:
- a new ExecutionIntent, or null if it's exhausted.
-