Interface SyntaxElement

All Known Subinterfaces:
DamageSourceExperimentSyntax, DefaultExpression<T>, ExperimentalSyntax, Expression<T>, KeyProviderExpression<T>, KeyReceiverExpression<T>, Literal<T>, QueueExperimentSyntax, ReflectionExperimentSyntax, SimpleExperimentalSyntax
All Known Implementing Classes:
AsyncEffect, AxolotlData, BeeData, BoatChestData, BoatData, CatData, ChickenData, CondCanAge, CondCanBreed, CondFishingLure, CondHasLootTable, CondIsAdult, CondIsBaby, CondIsInLove, CondIsInOpenWater, CondIsLootable, CondIsPressingKey, CondIsTagged, Condition, CondScalesWithDifficulty, CondTextDisplayHasDropShadow, CondTextDisplaySeeThroughBlocks, CondWasIndirect, ContainerExpression, ConvertedExpression, ConvertedKeyProviderExpression, ConvertedLiteral, CowData, CreeperData, DisplayData, DroppedItemData, EffAllowAging, EffBreedable, Effect, EffectSection, EffectSectionEffect, EffFishingLure, EffGenerateLoot, EffMakeAdultOrBaby, EffPullHookedEntity, EffRegisterTag, EffRotate, EffTextDisplayDropShadow, EffTextDisplaySeeThroughBlocks, EndermanData, EntityData, ch.njol.skript.expressions.base.EventValueExpression, EvtBreed, EvtBucketEntity, EvtFish, EvtFurnace, EvtPlayerInput, ExprBreedingFamily, ExprCausingEntity, ExprCreatedDamageSource, ExprCurrentInputKeys, ExprDamageLocation, ExprDamageType, ExprDirectEntity, ExprDisplayBillboard, ExprDisplayBrightness, ExprDisplayGlowOverride, ExprDisplayHeightWidth, ExprDisplayInterpolation, ExprDisplayShadow, ExprDisplayTeleportDuration, ExprDisplayTransformationRotation, ExprDisplayTransformationScaleTranslation, ExprDisplayViewRange, ExpressionList, ExpressionSection, ExprFishingApproachAngle, ExprFishingBiteTime, ExprFishingHook, ExprFishingHookEntity, ExprFishingWaitTime, ExprFoodExhaustion, ExprFurnaceEventItems, ExprFurnaceSlot, ExprFurnaceTime, ExprItemDisplayTransform, ExprItemOfEntity, ExprLoot, ExprLootContext, ExprLootContextEntity, ExprLootContextLocation, ExprLootContextLooter, ExprLootContextLuck, ExprLootItems, ExprLootTable, ExprLootTableFromString, ExprLootTableSeed, ExprLoveTime, ExprQuaternionAxisAngle, ExprRotate, ExprSecCreateLootContext, ExprSecDamageSource, ExprSourceLocation, ExprTag, ExprTagContents, ExprTagKey, ExprTagsOf, ExprTagsOfType, ExprTextDisplayAlignment, ExprTextDisplayLineWidth, ExprTextDisplayOpacity, ExprTextOf, FallingBlockData, FoxData, FrogData, GoatData, LiteralList, LiteralString, LlamaData, LoopSection, MinecartData, MooshroomData, OcelotData, PandaData, ParrotData, PigData, ch.njol.skript.conditions.base.PropertyCondition, ch.njol.skript.expressions.base.PropertyExpression, RabbitData, SalmonData, Section, ch.njol.skript.expressions.base.SectionExpression, SectionSkriptEvent, SelfRegisteringSkriptEvent, SheepData, SimpleEntityData, SimpleEvent, SimpleExpression, SimpleLiteral, ch.njol.skript.expressions.base.SimplePropertyExpression, SimplifiedLiteral, SkriptEvent, Statement, StriderData, Structure, ThrownPotionData, TropicalFishData, UnparsedLiteral, Variable, VariableString, VillagerData, VisualEffect, WolfData, XpOrbData, ZombieVillagerData

public interface SyntaxElement
Represents a general part of the syntax.
  • Method Details

    • preInit

      default boolean preInit()
      Called immediately after the constructor. This should be used to do any work that need to be done prior to downstream initialization. This is not intended to be used by syntaxes directly, but by parent classes to do work prior to the initialization of the child classes.
      Returns:
      Whether this expression was pre-initialised successfully. An error should be printed prior to returning false to specify the cause.
    • init

      boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult)
      Called just after the constructor and preInit().
      Parameters:
      expressions - all %expr%s included in the matching pattern in the order they appear in the pattern. If an optional value was left out, it will still be included in this list holding the default value of the desired type, which usually depends on the event.
      matchedPattern - The index of the pattern which matched
      isDelayed - Whether this expression is used after a delay or not (i.e. if the event has already passed when this expression will be called)
      parseResult - Additional information about the match.
      Returns:
      Whether this expression was initialised successfully. An error should be printed prior to returning false to specify the cause.
      See Also:
    • getParser

      default ParserInstance getParser()
      See Also:
    • getSyntaxTypeName

      @Contract(pure=true) @NotNull @NotNull String getSyntaxTypeName()
      Returns:
      A string naming the type of syntax this is. e.g. "expression", "section".