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,ConvertedKeyProviderExpression,ConvertedLiteral,ch.njol.skript.expressions.base.EventValueExpression,ExprBreedingFamily,ExprBrewingFuelLevel,ExprBrewingResults,ExprBrewingSlot,ExprBrewingTime,ExprCausingEntity,ExprCreatedDamageSource,ExprCurrentInputKeys,ExprDamageLocation,ExprDamageType,ExprDirectEntity,ExprDisplayBillboard,ExprDisplayBrightness,ExprDisplayGlowOverride,ExprDisplayHeightWidth,ExprDisplayInterpolation,ExprDisplayShadow,ExprDisplayTeleportDuration,ExprDisplayTransformationRotation,ExprDisplayTransformationScaleTranslation,ExprDisplayViewRange,ExprEquipCompCameraOverlay,ExprEquipCompEntities,ExprEquipCompEquipSound,ExprEquipCompModel,ExprEquipCompShearSound,ExprEquipCompSlot,ExprEquippableComponent,ExpressionList,ExprFishingApproachAngle,ExprFishingBiteTime,ExprFishingHook,ExprFishingHookEntity,ExprFishingWaitTime,ExprFoodExhaustion,ExprFurnaceEventItems,ExprFurnaceSlot,ExprFurnaceTime,ExprItemCompCopy,ExprItemDisplayTransform,ExprItemOfEntity,ExprLoot,ExprLootContext,ExprLootContextEntity,ExprLootContextLocation,ExprLootContextLooter,ExprLootContextLuck,ExprLootItems,ExprLootTable,ExprLootTableFromString,ExprLootTableSeed,ExprLoveTime,ExprQuaternionAxisAngle,ExprRecursiveSize,ExprRotate,ExprSecBlankEquipComp,ExprSecCreateLootContext,ExprSecDamageSource,ExprSourceLocation,ExprTag,ExprTagContents,ExprTagKey,ExprTagsOf,ExprTagsOfType,ExprTextDisplayAlignment,ExprTextDisplayLineWidth,ExprTextDisplayOpacity,ExprTextOf,LitAt,LitConsole,LitDoubleMaxValue,LitDoubleMinValue,LiteralList,LiteralString,LitEternity,LitFloatMaxValue,LitFloatMinValue,LitInfinity,LitIntMaxValue,LitIntMinValue,LitLongMaxValue,LitLongMinValue,LitNaN,LitNegativeInfinity,LitNewLine,LitPi,PropertyBaseExpression,ch.njol.skript.expressions.base.PropertyExpression,PropExprAmount,PropExprCustomName,PropExprName,PropExprNumber,PropExprSize,PropExprValueOf,ch.njol.skript.expressions.base.SectionExpression,SimpleExpression,SimpleLiteral,ch.njol.skript.expressions.base.SimplePropertyExpression,SimplifiedLiteral,UnparsedLiteral,Variable,VariableString
public interface Loopable<T>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks 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 booleanChecks 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:
-