Skip to content

Commit

Permalink
ExpressionInfo - fix an issue with a previous change that has broken …
Browse files Browse the repository at this point in the history
…a couple addons (#3625)

- This provides a constructor that matches the original constructor before the recent changes
  • Loading branch information
ShaneBeee authored and FranKusmiruk committed Mar 4, 2021
1 parent 1191127 commit f67a40d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/ch/njol/skript/lang/ExpressionInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@
*/
package ch.njol.skript.lang;

import org.eclipse.jdt.annotation.Nullable;

public class ExpressionInfo<E extends Expression<T>, T> extends SyntaxElementInfo<E> {

public Class<T> returnType;
@Nullable
public ExpressionType expressionType;

public ExpressionInfo(final String[] patterns, final Class<T> returnType, final Class<E> c, final String originClassPath, ExpressionType expressionType) throws IllegalArgumentException {
public ExpressionInfo(final String[] patterns, final Class<T> returnType, final Class<E> c, final String originClassPath) throws IllegalArgumentException {
this(patterns, returnType, c, originClassPath, null);
}

public ExpressionInfo(final String[] patterns, final Class<T> returnType, final Class<E> c, final String originClassPath, @Nullable ExpressionType expressionType) throws IllegalArgumentException {
super(patterns, c, originClassPath);
this.returnType = returnType;
this.expressionType = expressionType;
Expand All @@ -41,6 +48,7 @@ public Class<T> getReturnType() {
* Get the type of this expression.
* @return The type of this Expression
*/
@Nullable
public ExpressionType getExpressionType() {
return expressionType;
}
Expand Down

0 comments on commit f67a40d

Please sign in to comment.