Skip to content

Commit 320404f

Browse files
Merge branch 'dev/patch' into dev/feature
2 parents 75c6522 + e1a3603 commit 320404f

File tree

25 files changed

+211
-113
lines changed

25 files changed

+211
-113
lines changed

.github/workflows/archive-docs.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,43 @@ name: Archive documentation
22

33
on:
44
release:
5-
types: [published]
5+
types: [ published ]
66
workflow_dispatch:
77

88
jobs:
99
archive-docs:
10-
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Configure workflow
14-
id: configuration
15-
run: |
16-
echo "BRANCH_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
17-
echo "DOCS_OUTPUT_DIR=${GITHUB_WORKSPACE}/skript-docs/docs/archives/${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
18-
echo "DOCS_REPO_DIR=${GITHUB_WORKSPACE}/skript-docs" >> $GITHUB_OUTPUT
19-
echo "SKRIPT_REPO_DIR=${GITHUB_WORKSPACE}/skript" >> $GITHUB_OUTPUT
20-
- name: Checkout Skript
21-
uses: actions/checkout@v6
22-
with:
23-
submodules: recursive
24-
path: skript
25-
- name: Setup documentation environment
26-
uses: ./skript/.github/workflows/docs/setup-docs
27-
with:
28-
docs_deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
29-
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
30-
- name: Generate documentation
31-
uses: ./skript/.github/workflows/docs/generate-docs
32-
with:
33-
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
34-
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
35-
skript_repo_dir: ${{ steps.configuration.outputs.SKRIPT_REPO_DIR }}
36-
is_release: true
37-
generate_javadocs: true
38-
- name: Push archive documentation
39-
uses: ./skript/.github/workflows/docs/push-docs
40-
with:
41-
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
42-
git_name: Archive Docs Bot
43-
git_email: [email protected]
44-
git_commit_message: "Update ${{ steps.configuration.outputs.BRANCH_NAME }} archive docs"
10+
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Configure workflow
14+
id: configuration
15+
run: |
16+
echo "BRANCH_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
17+
echo "DOCS_OUTPUT_DIR=${GITHUB_WORKSPACE}/skript-docs/docs/archives/${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
18+
echo "DOCS_REPO_DIR=${GITHUB_WORKSPACE}/skript-docs" >> $GITHUB_OUTPUT
19+
echo "SKRIPT_REPO_DIR=${GITHUB_WORKSPACE}/skript" >> $GITHUB_OUTPUT
20+
- name: Checkout Skript
21+
uses: actions/checkout@v6
22+
with:
23+
submodules: recursive
24+
path: skript
25+
- name: Setup documentation environment
26+
uses: ./skript/.github/workflows/docs/setup-docs
27+
with:
28+
docs_repo: "SkriptLang/skript-docs"
29+
docs_token: ${{ secrets.DOCS_TOKEN }}
30+
- name: Generate documentation
31+
uses: ./skript/.github/workflows/docs/generate-docs
32+
with:
33+
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
34+
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
35+
skript_repo_dir: ${{ steps.configuration.outputs.SKRIPT_REPO_DIR }}
36+
is_release: true
37+
generate_javadocs: true
38+
- name: Push archive documentation
39+
uses: ./skript/.github/workflows/docs/push-docs
40+
with:
41+
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
42+
git_name: Archive Docs Bot
43+
git_email: [email protected]
44+
git_commit_message: "Update ${{ steps.configuration.outputs.BRANCH_NAME }} archive docs"

.github/workflows/cleanup-docs.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
- name: Checkout Skript
1818
uses: actions/checkout@v6
1919
with:
20-
ref: ${{ github.event.repository.default_branch }}
21-
submodules: recursive
22-
path: skript
20+
ref: ${{ github.event.repository.default_branch }}
21+
submodules: recursive
22+
path: skript
2323
- name: Setup documentation environment
2424
uses: ./skript/.github/workflows/docs/setup-docs
2525
with:
26-
docs_deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
27-
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
26+
docs_repo: "SkriptLang/skript-docs"
27+
docs_token: ${{ secrets.DOCS_TOKEN }}
2828
- name: Cleanup nightly documentation
2929
env:
3030
DOCS_OUTPUT_DIR: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
@@ -33,7 +33,7 @@ jobs:
3333
- name: Push nightly documentation cleanup
3434
uses: ./skript/.github/workflows/docs/push-docs
3535
with:
36-
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
37-
git_name: Nightly Docs Bot
38-
git_email: [email protected]
39-
git_commit_message: "Delete ${{ steps.configuration.outputs.BRANCH_NAME }} branch nightly docs"
36+
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
37+
git_name: Nightly Docs Bot
38+
git_email: [email protected]
39+
git_commit_message: "Delete ${{ steps.configuration.outputs.BRANCH_NAME }} branch nightly docs"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ org.gradle.parallel=true
55

66
groupid=ch.njol
77
name=skript
8-
version=2.14.1
8+
version=2.14.2
99
jarName=Skript.jar
1010
testEnv=java21/paper-1.21.11
1111
testEnvJavaVersion=21

gradle/wrapper/gradle-wrapper.jar

2.66 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/ch/njol/skript/classes/data/DefaultConverters.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ public DefaultConverters() {}
160160
return entity;
161161
return null;
162162
}, Converter.NO_CHAINING);
163+
// Entity - InventoryHolder
164+
Converters.registerConverter(Entity.class, InventoryHolder.class, entity -> {
165+
if (entity instanceof InventoryHolder inventoryHolder)
166+
return inventoryHolder;
167+
return null;
168+
}, Converter.NO_RIGHT_CHAINING);
163169

164170

165171
if (!SkriptConfig.useTypeProperties.value()) {

src/main/java/ch/njol/skript/expressions/arithmetic/ExprArithmetic.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import ch.njol.skript.lang.SkriptParser.ParseResult;
1414
import ch.njol.skript.lang.UnparsedLiteral;
1515
import ch.njol.skript.lang.parser.ParsingStack;
16+
import ch.njol.skript.lang.simplification.SimplifiedLiteral;
1617
import ch.njol.skript.lang.util.SimpleExpression;
1718
import ch.njol.skript.registrations.Classes;
1819
import ch.njol.skript.util.LiteralUtils;
@@ -24,7 +25,6 @@
2425
import org.skriptlang.skript.lang.arithmetic.Arithmetics;
2526
import org.skriptlang.skript.lang.arithmetic.OperationInfo;
2627
import org.skriptlang.skript.lang.arithmetic.Operator;
27-
import ch.njol.skript.lang.simplification.SimplifiedLiteral;
2828

2929
import java.lang.reflect.Array;
3030
import java.util.ArrayList;
@@ -43,8 +43,6 @@
4343
@SuppressWarnings("null")
4444
public class ExprArithmetic<L, R, T> extends SimpleExpression<T> {
4545

46-
private static final Class<?>[] INTEGER_CLASSES = {Long.class, Integer.class, Short.class, Byte.class};
47-
4846
private record PatternInfo(Operator operator, boolean leftGrouped, boolean rightGrouped) {
4947
}
5048

@@ -247,21 +245,6 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
247245
returnType = operationInfo.returnType();
248246
}
249247

250-
// ensure proper return types for numerical operations
251-
if (Number.class.isAssignableFrom(returnType)) {
252-
if (operator == Operator.DIVISION || operator == Operator.EXPONENTIATION) {
253-
returnType = (Class<? extends T>) Double.class;
254-
} else {
255-
boolean firstIsInt = false;
256-
boolean secondIsInt = false;
257-
for (Class<?> i : INTEGER_CLASSES) {
258-
firstIsInt |= i.isAssignableFrom(first.getReturnType());
259-
secondIsInt |= i.isAssignableFrom(second.getReturnType());
260-
}
261-
returnType = (Class<? extends T>) (firstIsInt && secondIsInt ? Long.class : Double.class);
262-
}
263-
}
264-
265248
/*
266249
* Step 3: Chaining and Parsing
267250
*

src/main/java/ch/njol/skript/expressions/base/PropertyExpression.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public static String[] getDefaultPatterns(String property, String fromType) {
7777
* They will be registered before {@link SyntaxInfo#PATTERN_MATCHES_EVERYTHING} expressions
7878
* but after {@link SyntaxInfo#COMBINED} expressions.
7979
*/
80-
@ApiStatus.Experimental
8180
public static final Priority DEFAULT_PRIORITY = Priority.before(SyntaxInfo.PATTERN_MATCHES_EVERYTHING);
8281

8382
/**
@@ -139,7 +138,6 @@ public static <E extends Expression<T>, T> SyntaxInfo.Expression<E, T> registerD
139138
* @param <E> The Expression type.
140139
* @return The registered {@link SyntaxInfo}.
141140
*/
142-
@ApiStatus.Experimental
143141
public static <E extends Expression<T>, T> SyntaxInfo.Expression.Builder<? extends SyntaxInfo.Expression.Builder<?, E, T>, E, T> infoBuilder(
144142
Class<E> expressionClass, Class<T> returnType, String property, String type, boolean isDefault) {
145143
return SyntaxInfo.Expression.builder(expressionClass, returnType)

0 commit comments

Comments
 (0)