Class ExpressionEntryData<T>

java.lang.Object
org.skriptlang.skript.lang.entry.EntryData<Expression<? extends T>>
org.skriptlang.skript.lang.entry.KeyValueEntryData<Expression<? extends T>>
org.skriptlang.skript.lang.entry.util.ExpressionEntryData<T>

public class ExpressionEntryData<T> extends KeyValueEntryData<Expression<? extends T>>
A type of KeyValueEntryData designed to parse its value as an Expression. This data CAN return null if expression parsing fails. Note that it will print an error.
  • Constructor Details

    • ExpressionEntryData

      public ExpressionEntryData(String key, @Nullable @Nullable Expression<T> defaultValue, boolean optional, Class<T> returnType)
      Parameters:
      returnType - The expected return type of the matched expression.
    • ExpressionEntryData

      public ExpressionEntryData(String key, @Nullable @Nullable Expression<T> defaultValue, boolean optional, Class<T> returnType, int flags)
      Parameters:
      returnType - The expected return type of the matched expression.
      flags - Parsing flags. See SkriptParser(String, int, ParseContext) javadoc for more details.
    • ExpressionEntryData

      @SafeVarargs public ExpressionEntryData(String key, @Nullable @Nullable Expression<T> defaultValue, boolean optional, Class<T>... returnTypes)
      Parameters:
      returnTypes - The expected return types of the matched expression.
    • ExpressionEntryData

      @SafeVarargs public ExpressionEntryData(String key, @Nullable @Nullable Expression<T> defaultValue, boolean optional, int flags, Class<T>... returnTypes)
      Parameters:
      flags - Parsing flags. See SkriptParser(String, int, ParseContext) javadoc for more details.
      returnTypes - The expected return types of the matched expression.
  • Method Details