Package ch.njol.skript.lang
Interface Loopable<T>
- All Known Subinterfaces:
DefaultExpression<T>
,Expression<T>
,KeyProviderExpression<T>
,KeyReceiverExpression<T>
,Literal<T>
- All Known Implementing Classes:
ContainerExpression
,ConvertedExpression
,ConvertedLiteral
,ch.njol.skript.expressions.base.EventValueExpression
,ExprBreedingFamily
,ExprCurrentInputKeys
,ExprDisplayBillboard
,ExprDisplayBrightness
,ExprDisplayGlowOverride
,ExprDisplayHeightWidth
,ExprDisplayInterpolation
,ExprDisplayShadow
,ExprDisplayTeleportDuration
,ExprDisplayTransformationRotation
,ExprDisplayTransformationScaleTranslation
,ExprDisplayViewRange
,ExpressionList
,ExprFishingApproachAngle
,ExprFishingBiteTime
,ExprFishingHook
,ExprFishingHookEntity
,ExprFishingWaitTime
,ExprFurnaceEventItems
,ExprFurnaceSlot
,ExprFurnaceTime
,ExprItemDisplayTransform
,ExprItemOfEntity
,ExprLoot
,ExprLootContext
,ExprLootContextEntity
,ExprLootContextLocation
,ExprLootContextLooter
,ExprLootContextLuck
,ExprLootItems
,ExprLootTable
,ExprLootTableFromString
,ExprLootTableSeed
,ExprLoveTime
,ExprQuaternionAxisAngle
,ExprRotate
,ExprSecCreateLootContext
,ExprTag
,ExprTagContents
,ExprTagKey
,ExprTagsOf
,ExprTagsOfType
,ExprTextDisplayAlignment
,ExprTextDisplayLineWidth
,ExprTextDisplayOpacity
,ExprTextOf
,LiteralList
,LiteralString
,ch.njol.skript.expressions.base.PropertyExpression
,ch.njol.skript.expressions.base.SectionExpression
,SimpleExpression
,SimpleLiteral
,ch.njol.skript.expressions.base.SimplePropertyExpression
,UnparsedLiteral
,Variable
,VariableString
public interface Loopable<T>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the given 'loop-...' expression should match this loop, e.g.iterator
(org.bukkit.event.Event event) Returns the same asExpression.getArray(Event)
but as an iterator.default boolean
Checks whether the expression allows using 'next loop-value' when provided as the iterator for a SecLoop.
-
Method Details
-
iterator
Returns the same asExpression.getArray(Event)
but as an iterator. This method should be overridden by expressions intended to be looped to increase performance.- Parameters:
event
- The event to be used for evaluation- Returns:
- An iterator to iterate over all values of this expression which may be empty and/or null, but must not return null elements.
- See Also:
-
isLoopOf
Checks whether the given 'loop-...' expression should match this loop, e.g. loop-block matches any loops that loop through blocks and loop-argument matches an argument loop.You should usually just return false as e.g. loop-block will automatically match the expression if its returnType is Block or a subtype of it.
- Parameters:
input
- The entered input string (the blank in loop-___)- Returns:
- Whether this loop matches the given string
-
supportsLoopPeeking
default boolean supportsLoopPeeking()Checks whether the expression allows using 'next loop-value' when provided as the iterator for a SecLoop.- Returns:
-