Skip to content

Commit

Permalink
Merge branch 'feature/sorted-by' of https://github.com/sovdeeth/Skript
Browse files Browse the repository at this point in the history
…into feature/sorted-by
  • Loading branch information
sovdeeth committed Jul 1, 2024
2 parents c94b186 + 69d5d7f commit dfe042d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/effects/EffSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean is
}
unsortedObjects = (Variable<?>) expressions[0];

if (parseResult.regexes.size() > 0) {
if (!parseResult.regexes.isEmpty()) {
unparsedExpression = parseResult.regexes.get(0).group();
assert unparsedExpression != null;
InputData inputData = getParser().getData(InputData.class);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/njol/skript/expressions/ExprFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,5 @@ public boolean hasIndices() {
public String getCurrentIndex() {
return currentFilterIndex;
}

}
2 changes: 1 addition & 1 deletion src/test/skript/tests/syntaxes/effects/EffSort.sk
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ test "sorting":
set {_list::zysa} to 4
set {_list::aaaaa} to 5
sort {_list::*} by length of input index
assert {_list::*} is integers from 1 to 5 with "improper custom sorting based on index"
assert {_list::*} is integers from 1 to 5 with "improper custom sorting based on index"

0 comments on commit dfe042d

Please sign in to comment.