Skip to content

Commit f86eed8

Browse files
authored
Merge branch 'dev/feature' into addition-brush-stuff
2 parents befbca9 + cbe81ea commit f86eed8

File tree

401 files changed

+11263
-2480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+11263
-2480
lines changed

.github/CODEOWNERS

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Changes in general
2+
* @skriptlang/core-developers
3+
4+
# Protect github files
5+
/.github/ @skriptlang/core-maintainers
6+
7+
# Changes to code (specified for future granularity)
8+
/src/main/java/ @skriptlang/core-developers
9+
10+
# Changes to tests (specified for future granularity)
11+
/src/test/ @skriptlang/core-developers
12+
13+
# Changes to critical code
14+
/src/main/java/org/skriptlang/skript/lang/ @skriptlang/core-maintainers @skriptlang/core-developers
15+
/src/main/java/ch/njol/skript/lang/ @skriptlang/core-maintainers @skriptlang/core-developers
16+
/src/main/java/ch/njol/skript/variables/ @skriptlang/core-maintainers @skriptlang/core-developers
17+
/src/main/java/ch/njol/yggdrasil/ @skriptlang/core-maintainers @skriptlang/core-developers
18+
/src/main/java/ch/njol/skript/Skript.java @skriptlang/core-maintainers @skriptlang/core-developers
19+
/src/main/java/ch/njol/skript/test/ @skriptlang/core-maintainers @skriptlang/core-developers
20+
/src/main/java/ch/njol/skript/patterns/ @skriptlang/core-maintainers @skriptlang/core-developers
21+
/src/main/java/ch/njol/skript/expressions/base/ @skriptlang/core-maintainers @skriptlang/core-developers
22+
/src/main/java/ch/njol/skript/conditions/base/ @skriptlang/core-maintainers @skriptlang/core-developers
23+
/src/main/java/ch/njol/skript/config/ @skriptlang/core-maintainers @skriptlang/core-developers
24+
/src/main/java/ch/njol/skript/classes/ @skriptlang/core-maintainers @skriptlang/core-developers
25+
/src/main/java/ch/njol/skript/classes/data/ @skriptlang/core-developers # classes is critical but classes/data is not
26+
27+
# Personal specialties
28+
29+
# Runtime errors
30+
/src/main/java/org/skriptlang/skript/log/runtime/ @sovdeeth @skriptlang/core-developers
31+
/src/main/java/org/skriptlang/skript/bukkit/log/runtime/ @sovdeeth @skriptlang/core-developers
32+
33+
# Tags
34+
/src/main/java/org/skriptlang/skript/bukkit/tags/ @sovdeeth @skriptlang/core-developers
35+
36+
# Conditionals
37+
/src/main/java/org/skriptlang/skript/lang/condition/ @sovdeeth @skriptlang/core-developers
38+
39+
# Displays/Rotation
40+
/src/main/java/org/skriptlang/skript/bukkit/misc/rotation/ @sovdeeth @skriptlang/core-developers
41+
/src/main/java/org/skriptlang/skript/bukkit/displays/ @sovdeeth @skriptlang/core-developers
42+
43+
# Commands
44+
/src/main/java/ch/njol/skript/command/ @sovdeeth @skriptlang/core-developers
45+
46+
# Aliases
47+
/src/main/java/ch/njol/skript/aliases @sovdeeth @skriptlang/core-developers
48+
49+
# Registration API
50+
/src/main/java/org/skriptlang/skript/registration/ @APickledWalrus @skriptlang/core-developers
51+
/src/main/java/org/skriptlang/skript/bukkit/registration/ @APickledWalrus @skriptlang/core-developers
52+
/src/main/java/org/skriptlang/skript/addon/ @APickledWalrus @skriptlang/core-developers
53+
54+
# EntryData
55+
/src/main/java/org/skriptlang/skript/lang/entry/ @APickledWalrus @skriptlang/core-developers
56+
57+
# Arithmetic
58+
/src/main/java/org/skriptlang/skript/lang/arithmetic/ @UnderscoreTud @skriptlang/core-developers
59+
/src/main/java/ch/njol/skript/expressions/arithmetic/ @UnderscoreTud @skriptlang/core-developers
60+
61+
# Input API
62+
/src/main/java/org/skriptlang/skript/bukkit/input/ @UnderscoreTud @skriptlang/core-developers
63+
64+
# Documentation
65+
/src/main/java/ch/njol/skript/doc/ @Pikachu920 @AyhamAl-Ali @Efnilite @skriptlang/core-developers

.github/pull_request_template.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
### Description
2-
<!--- Describe your changes here. --->
1+
### Problem
2+
<!--- Why is this PR necessary? What problems exist that needed solving? --->
3+
4+
5+
### Solution
6+
<!--- Explain how your solution fixes the problem and summarize the major code changes. --->
7+
8+
9+
### Testing Completed
10+
<!--- List test scripts/unit tests and any manual testing that was performed. If no test scripts or unit tests are present, explain why. --->
11+
12+
13+
### Supporting Information
14+
<!--- Any related information, todos, breaking changes, or outstanding issues can be described here --->
15+
316

417
---
5-
**Target Minecraft Versions:** any <!-- 'any' means all supported versions -->
6-
**Requirements:** none <!-- Required plugins, server software... -->
7-
**Related Issues:** none <!-- Links to related issues -->
18+
**Completes:** none <!-- Links to issues or discussions that should be completed when this PR is merged. -->
19+
**Related:** none <!-- Links to issues or discussions with related information -->

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ local.properties
1717
.project
1818
.classpath
1919

20+
### VS CODE ###
21+
.vscode/
22+
2023
# External tool builders
2124
.externalToolBuilders/
2225

build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@ allprojects {
2020
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
2121
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
2222
maven { url 'https://repo.papermc.io/repository/maven-public/' }
23-
maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } // needed for paper adventure snapshot
2423
maven { url 'https://ci.emc.gs/nexus/content/groups/aikar/' }
2524
}
2625
}
2726

2827
dependencies {
2928
shadow group: 'io.papermc', name: 'paperlib', version: '1.0.8'
3029
shadow group: 'org.bstats', name: 'bstats-bukkit', version: '3.1.0'
31-
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.3.4'
30+
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.4.0'
3231

33-
implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.21.4-R0.1-SNAPSHOT'
32+
implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.21.5-R0.1-SNAPSHOT'
3433
implementation group: 'com.google.code.findbugs', name: 'findbugs', version: '3.0.1'
3534

3635
// bundled with Minecraft 1.19.4+ for display entity transforms
@@ -247,7 +246,7 @@ void createTestTask(String name, String desc, String environments, int javaVersi
247246
def java21 = 21
248247
def java17 = 17
249248

250-
def latestEnv = 'java21/paper-1.21.4.json'
249+
def latestEnv = 'java21/paper-1.21.5.json'
251250
def latestJava = java21
252251
def oldestJava = java17
253252

code-conventions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,14 @@ The exceptions are `Material.AIR`, which is a good way to represent "nothing"
314314
and `Material.STONE` which can be used to get a dummy `ItemMeta`.
315315

316316
Prefer to avoid referencing the Biome enum directly, since it has changed between versons in the past.
317+
318+
### Deprecating
319+
320+
When deprecating a Java element (such as a class, method, or constructor):
321+
322+
1. Replace all internal usages of the deprecated element within the Skript codebase.
323+
2. Add a Javadoc `@deprecated` tag that states the recommended alternative.
324+
3. Annotate the element with `@Deprecated(since = "INSERT VERSION", forRemoval = true)` to indicate it is scheduled for removal and what feature version it was deprecated.
325+
326+
Deprecation PRs are typically merged for a feature release, so the PR should target `dev/feature` branch.
327+
Deprecated elements may be removed three feature releases after the version they were deprecated in.

gradle.properties

Lines changed: 2 additions & 2 deletions
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.10.2
8+
version=2.11.2
99
jarName=Skript.jar
10-
testEnv=java21/paper-1.21.4
10+
testEnv=java21/paper-1.21.5
1111
testEnvJavaVersion=21

skript-aliases

src/main/java/ch/njol/skript/ScriptLoader.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ public static ArrayList<TriggerItem> loadItems(SectionNode node) {
962962
if (!SkriptParser.validateLine(expr))
963963
continue;
964964

965-
TriggerItem item;
965+
TriggerItem item = null;
966966
if (subNode instanceof SimpleNode) {
967967
long start = System.currentTimeMillis();
968968
item = Statement.parse(expr, items, "Can't understand this condition/effect: " + expr);
@@ -982,43 +982,46 @@ public static ArrayList<TriggerItem> loadItems(SectionNode node) {
982982
Skript.debug(SkriptColor.replaceColorChar(parser.getIndentation() + item.toString(null, true)));
983983

984984
items.add(item);
985-
} else if (subNode instanceof SectionNode) {
985+
} else if (subNode instanceof SectionNode subSection) {
986986
TypeHints.enterScope(); // Begin conditional type hints
987987

988988
RetainingLogHandler handler = SkriptLogger.startRetainingLog();
989989
find_section:
990990
try {
991-
item = Section.parse(expr, "Can't understand this section: " + expr, (SectionNode) subNode, items);
991+
item = Section.parse(expr, "Can't understand this section: " + expr, subSection, items);
992992
if (item != null)
993993
break find_section;
994994

995995
// back up the failure log
996996
RetainingLogHandler backup = handler.backup();
997997
handler.clear();
998998

999-
item = Statement.parse(expr, "Can't understand this condition/effect: " + expr, (SectionNode) subNode, items);
999+
item = Statement.parse(expr, "Can't understand this condition/effect: " + expr, subSection, items);
10001000

10011001
if (item != null)
10021002
break find_section;
10031003
Collection<LogEntry> errors = handler.getErrors();
10041004

1005-
// restore the failure log
1006-
if (errors.isEmpty()) {
1005+
// restore the failure log if:
1006+
// 1. there are no errors from the statement parse
1007+
// 2. the error message is the default one from the statement parse
1008+
// 3. the backup log contains a message about the section being claimed
1009+
if (errors.isEmpty()
1010+
|| errors.iterator().next().getMessage().contains("Can't understand this condition/effect:")
1011+
|| backup.getErrors().iterator().next().getMessage().contains("tried to claim the current section, but it was already claimed by")
1012+
) {
10071013
handler.restore(backup);
1008-
} else { // We specifically want these two errors in preference to the section error!
1009-
String firstError = errors.iterator().next().getMessage();
1010-
if (!firstError.contains("is a valid statement but cannot function as a section (:)")
1011-
&& !firstError.contains("You cannot have two section-starters in the same line"))
1012-
handler.restore(backup);
10131014
}
10141015
continue;
10151016
} finally {
1017+
RetainingLogHandler afterParse = handler.backup();
1018+
handler.clear();
10161019
handler.printLog();
1020+
if (item != null && (Skript.debug() || subNode.debug()))
1021+
Skript.debug(SkriptColor.replaceColorChar(parser.getIndentation() + item.toString(null, true)));
1022+
afterParse.printLog();
10171023
}
10181024

1019-
if (Skript.debug() || subNode.debug())
1020-
Skript.debug(SkriptColor.replaceColorChar(parser.getIndentation() + item.toString(null, true)));
1021-
10221025
items.add(item);
10231026

10241027
// Destroy these conditional type hints

src/main/java/ch/njol/skript/Skript.java

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public static void updateMinecraftVersion() {
210210

211211
@Nullable
212212
private static Version version = null;
213-
@Deprecated(forRemoval = true) // TODO this field will be replaced by a proper registry later
213+
@Deprecated(since = "2.9.0", forRemoval = true) // TODO this field will be replaced by a proper registry later
214214
private static @UnknownNullability ExperimentRegistry experimentRegistry;
215215

216216
public static Version getVersion() {
@@ -1077,18 +1077,6 @@ public static boolean isRunningMinecraft(final Version v) {
10771077
return minecraftVersion.compareTo(v) >= 0;
10781078
}
10791079

1080-
/**
1081-
* Used to test whether certain Bukkit features are supported.
1082-
*
1083-
* @param className
1084-
* @return Whether the given class exists.
1085-
* @deprecated use {@link #classExists(String)}
1086-
*/
1087-
@Deprecated
1088-
public static boolean supports(final String className) {
1089-
return classExists(className);
1090-
}
1091-
10921080
/**
10931081
* Tests whether a given class exists in the classpath.
10941082
*
@@ -1379,7 +1367,7 @@ private static void stopAcceptingRegistrations() {
13791367

13801368
// ================ ADDONS ================
13811369

1382-
@Deprecated
1370+
@Deprecated(since = "2.10.0", forRemoval = true)
13831371
private static final Set<SkriptAddon> addons = new HashSet<>();
13841372

13851373
/**
@@ -1429,7 +1417,7 @@ public static SkriptAddon registerAddon(JavaPlugin plugin) {
14291417
return Collections.unmodifiableCollection(addons);
14301418
}
14311419

1432-
@Deprecated
1420+
@Deprecated(since = "2.10.0", forRemoval = true)
14331421
private static @Nullable SkriptAddon addon;
14341422

14351423
/**

src/main/java/ch/njol/skript/SkriptCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,10 @@ private static List<File> getSubFiles(File file) {
514514
}
515515

516516
/**
517-
* Moved to {@link ScriptLoader#getScriptFromName(String)}
517+
* @deprecated Use {@link ScriptLoader#getScriptFromName(String)} instead.
518518
*/
519519
@Nullable
520-
@Deprecated(forRemoval = true)
520+
@Deprecated(since = "2.10.0", forRemoval = true)
521521
public static File getScriptFromName(String script) {
522522
return ScriptLoader.getScriptFromName(script);
523523
}

0 commit comments

Comments
 (0)