All Implemented Interfaces:
Debuggable, Expression<Object>, Loopable<Object>, Simplifiable<Expression<? extends Object>>, SyntaxElement, PropertyBaseSyntax<TypedValueHandler<?,?>>, RuntimeErrorProducer, SyntaxRuntimeErrorProducer

@Name("Value") @Description({"Returns the value of something that has a value, e.g. a node in a config.","The value is automatically converted to the specified type (e.g. text, number) where possible."}) @Example("set {_node} to node \"update check interval\" in the skript config\n\nbroadcast text value of {_node}\n# text value of {_node} = \"12 hours\" (text)\n\nwait for {_node}\'s timespan value\n# timespan value of {_node} = 12 hours (duration)\n") @Since("2.10") @RelatedProperty("typed value") public class PropExprValueOf extends PropertyBaseExpression<TypedValueHandler<?,?>>
  • Constructor Details

    • PropExprValueOf

      public PropExprValueOf()
  • Method Details

    • register

      public static void register(SyntaxRegistry registry, Origin origin)
    • init

      public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult)
      Description copied from interface: SyntaxElement
      Called just after the constructor and SyntaxElement.preInit().
      Specified by:
      init in interface SyntaxElement
      Overrides:
      init in class PropertyBaseExpression<TypedValueHandler<?,?>>
      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:
    • get

      protected Object @Nullable [] get(org.bukkit.event.Event event)
      Description copied from class: SimpleExpression
      This is the internal method to get an expression's values.
      To get the expression's value from the outside use SimpleExpression.getSingle(Event) or SimpleExpression.getArray(Event).
      Overrides:
      get in class PropertyBaseExpression<TypedValueHandler<?,?>>
      Parameters:
      event - The event with which this expression is evaluated.
      Returns:
      An array of values for this event. May not contain nulls.
    • getProperty

      @NotNull public @NotNull Property<TypedValueHandler<?,?>> getProperty()
      Description copied from interface: PropertyBaseSyntax
      Gets the property this expression represents. This is used to find the appropriate handlers for the expression's input types.
      Returns:
      The property this expression represents.