Skip to content

Commit

Permalink
🛠️ Fix ExprRandom missing canInitSafely
Browse files Browse the repository at this point in the history
  • Loading branch information
AyhamAl-Ali committed Mar 27, 2024
1 parent 7a79d87 commit 53f8618
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/ch/njol/skript/expressions/ExprRandom.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
} else {
expr = exprs[1].getConvertedExpression((((Literal<ClassInfo<?>>) exprs[0]).getSingle()).getC());
}
if (expr == null)
return false;
return true;
return expr != null && LiteralUtils.canInitSafely(expr);
}

@Override
Expand Down

0 comments on commit 53f8618

Please sign in to comment.