Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into dev/feature #6211

Merged
merged 63 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
d4c0a68
Fix ExprRandomNumber using a method from Java 17 (#6022)
UnderscoreTud Sep 17, 2023
e048068
Fix changing remaining time of command cooldown (#6021)
sovdeeth Sep 17, 2023
4b78e98
Bump version to 2.7.1 (#5993)
TheLimeGlass Sep 17, 2023
da67d64
fix 3 stray INSERT VERSIONs from 2.7.0 (#6027)
sovdeeth Sep 18, 2023
a27101f
Fix Documentation Actions on dev/patch (#6042)
APickledWalrus Sep 19, 2023
9e429f2
Tidy up parts of config class. (#6025)
Moderocky Sep 20, 2023
438851a
Add Release Model Document (#6041)
APickledWalrus Sep 20, 2023
06df281
(Cherry Pick) Fix cast throwing if existing variable for command stor…
Moderocky Sep 20, 2023
5711da9
(Cherry Pick) Fix NPE with invalid attributes and clean up ExprEntity…
Moderocky Sep 20, 2023
afc9148
Fix multiple aliases sections not working (#6050)
APickledWalrus Sep 22, 2023
bfa4421
Fix error when unloading a script with multiple variables sections (#…
Moderocky Sep 22, 2023
e618afa
Bump actions/checkout from 3 to 4 (#6029)
dependabot[bot] Sep 20, 2023
347ab46
⚒ Disable Javadocs generation for nightly docs & improvements (#6059)
AyhamAl-Ali Sep 23, 2023
3b4c9aa
Change the target branch of dependabot (#6063)
TheLimeGlass Sep 24, 2023
3922933
⚒ Fix stop all sounds NPE (#6067)
AyhamAl-Ali Sep 24, 2023
762100f
Bump actions/checkout from 3 to 4 (#6069)
dependabot[bot] Sep 25, 2023
9934f23
Bump org.gradle.toolchains.foojay-resolver-convention from 0.5.0 to 0…
dependabot[bot] Sep 25, 2023
98c75ed
Bump org.easymock:easymock from 5.1.0 to 5.2.0 (#6071)
dependabot[bot] Sep 25, 2023
8603b2b
Bump io.papermc.paper:paper-api from 1.20.1-R0.1-SNAPSHOT to 1.20.2-R…
dependabot[bot] Sep 25, 2023
78116e7
Pull request template defaults (#5665)
TheLimeGlass Sep 25, 2023
9d5211c
Fix EvtPlayerChunkEnter Comparison & Cleanup (#5965)
NotSoDelayed Sep 25, 2023
d021f1a
Fixes EffSecSpawn not properly handling local variables created withi…
sovdeeth Sep 25, 2023
d1f73b8
Remove PlayerPreprocessCommandEvent listener and clean up Commands (#…
sovdeeth Sep 26, 2023
58f1c9f
Clean up vector classes and fix a few bugs.
sovdeeth Aug 30, 2023
50f0f3c
More improvements
sovdeeth Aug 31, 2023
4a7c510
Apply suggestions from code review
sovdeeth Aug 31, 2023
729b0ec
Budget Expansion
sovdeeth Aug 31, 2023
613a067
Merge pull request #5952 from sovdeeth/RotateVectorToStringFix
sovdeeth Sep 29, 2023
be77015
Fix Logging Issues In ExpressionEntryData (#6081)
APickledWalrus Oct 1, 2023
8a62465
Prepare For Release 2.7.1 (#6082)
APickledWalrus Oct 1, 2023
8c7fec0
Merge dev/patch into master
APickledWalrus Oct 1, 2023
886fb67
Update Minecraft wiki links to new domain (#6078)
Spongecade Oct 2, 2023
1789a95
⚒ Fix fake player count paper check error (#6090)
AyhamAl-Ali Oct 3, 2023
b774caf
Fix Command Help (#6080)
UnderscoreTud Oct 3, 2023
71b05eb
Bump net.kyori:adventure-text-serializer-bungeecord from 4.3.0 to 4.3…
dependabot[bot] Oct 5, 2023
da97d3e
Fix unloading/reloading a directory in the scripts effect (#6106)
Moderocky Oct 8, 2023
54f1249
Force UTF-8 encoding for Gradle daemon (#6103)
APickledWalrus Oct 9, 2023
61201bd
Corrected Javadocs name, title (#6038)
MihirKohli Oct 9, 2023
c34b83a
Rebase JUnit references fix for dev/patch (#6057)
TheLimeGlass Oct 10, 2023
74c4d63
Fix options issue in functions (#6121)
APickledWalrus Oct 15, 2023
ed6174c
Fix command permission messages (2.7.1 issue) (#6126)
sovdeeth Oct 16, 2023
86fe449
Fix stack overflow when stringifying block inventories. (#6117)
Moderocky Oct 16, 2023
8423652
Fix comparison of cyclical types (specifically comparing times) (#6128)
Moderocky Oct 17, 2023
5ba4dba
Fix floating point rounding error in loop N times (#6132)
Moderocky Oct 17, 2023
8895157
Fix Sorted List Expression (#6102)
UnderscoreTud Oct 30, 2023
9deb288
Fix colour codes being reset in reload message. (#6150)
Moderocky Oct 30, 2023
a91bf9a
Fix ExprDurability's Changer (#6154)
UnderscoreTud Nov 1, 2023
451b739
Catch the exception when pushing entity by non finite vector (#5765)
3meraldK Jul 19, 2023
7eaacc8
Fix issues with ExprDrops (#6130)
sovdeeth Nov 1, 2023
0e6be2d
Prepare For Release (2.7.2) (#6166)
APickledWalrus Nov 1, 2023
7178dc4
Merge pull request #6167 from SkriptLang/dev/patch
Moderocky Nov 1, 2023
4cc45e7
Prevent InventoryHolder -> X chaining (#6171)
sovdeeth Nov 25, 2023
f30f023
Improve Location Comparison (#6205)
sovdeeth Dec 1, 2023
ac5ff5b
Allow asynchronous SkriptEvent#check execution (#6201)
APickledWalrus Dec 1, 2023
e5c4d4a
Fix ExprSets conflicting (#6123)
TheLimeGlass Dec 1, 2023
01ae4e7
Prepare for Release (2.7.3) (#6208)
APickledWalrus Dec 1, 2023
1a009cd
Merge pull request #6210 from SkriptLang/dev/patch
APickledWalrus Dec 1, 2023
a68f758
Merge branch 'master' into enhancement/merge-master-into-feature
APickledWalrus Dec 1, 2023
02cdd1a
Further corrections
APickledWalrus Dec 1, 2023
3c88998
Merge branch 'dev/feature' into enhancement/merge-master-into-feature
Moderocky Dec 10, 2023
d1cb1d5
Fix NPE issue with drops in 1.20.2
sovdeeth Dec 11, 2023
a26afb1
Update StructFunction.java
sovdeeth Dec 17, 2023
a418747
Merge branch 'dev/feature' into enhancement/merge-master-into-feature
sovdeeth Dec 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<!--- Describe your changes here. --->

---
**Target Minecraft Versions:** <!-- 'any' means all supported versions -->
**Requirements:** <!-- Required plugins, Minecraft versions, server software... -->
**Related Issues:** <!-- Links to related issues -->
**Target Minecraft Versions:** any <!-- 'any' means all supported versions -->
**Requirements:** none <!-- Required plugins, server software... -->
**Related Issues:** none <!-- Links to related issues -->
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ allprojects {
dependencies {
shadow group: 'io.papermc', name: 'paperlib', version: '1.0.8'
shadow group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.2'
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.3.0'
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.3.1'

implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.20.1-R0.1-SNAPSHOT'
implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.20.2-R0.1-SNAPSHOT'
implementation group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '2.2.700'
implementation group: 'com.google.code.findbugs', name: 'findbugs', version: '3.0.1'
implementation group: 'com.sk89q.worldguard', name: 'worldguard-legacy', version: '7.0.0-SNAPSHOT'
Expand Down Expand Up @@ -226,7 +226,7 @@ void createTestTask(String name, String desc, String environments, int javaVersi
main = 'ch.njol.skript.test.platform.PlatformMain'
args = [
'build/test_runners',
junit ? 'src/test/skript/tests/junit' : 'src/test/skript/tests',
junit ? 'src/test/skript/junit' : 'src/test/skript/tests',
'src/test/resources/runner_data',
environments,
modifiers.contains(Modifiers.DEV_MODE),
Expand All @@ -250,7 +250,7 @@ void createTestTask(String name, String desc, String environments, int javaVersi
}
}

def latestEnv = 'java17/paper-1.20.1.json'
def latestEnv = 'java17/paper-1.20.2.json'
def latestJava = 17
def oldestJava = 8

Expand Down Expand Up @@ -393,7 +393,7 @@ task nightlyRelease(type: ShadowJar) {

javadoc {
dependsOn nightlyResources

source = sourceSets.main.allJava

exclude("ch/njol/skript/conditions/**")
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Ensure encoding is consistent across systems.
org.gradle.jvmargs=-Xmx1G -Dfile.encoding=UTF-8
org.gradle.parallel=true

groupid=ch.njol
name=skript
version=2.8.0-dev
jarName=Skript.jar
testEnv=java17/paper-1.20.1
testEnv=java17/paper-1.20.2
testEnvJavaVersion=17
2 changes: 1 addition & 1 deletion skript-aliases
Submodule skript-aliases updated 1 files
+3 −1 decoration.sk
9 changes: 5 additions & 4 deletions src/main/java/ch/njol/skript/Skript.java
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ public void run() {
tainted = true;
try {
getAddonInstance().loadClasses("ch.njol.skript.test.runner");
if (TestMode.JUNIT)
getAddonInstance().loadClasses("org.skriptlang.skript.test.junit.registration");
} catch (IOException e) {
Skript.exception("Failed to load testing environment.");
Bukkit.getServer().shutdown();
Expand Down Expand Up @@ -684,7 +686,6 @@ protected void afterErrors() {
TestTracker.testFailed("exception was thrown during execution");
}
if (TestMode.JUNIT) {
SkriptLogger.setVerbosity(Verbosity.DEBUG);
info("Running all JUnit tests...");
long milliseconds = 0, tests = 0, fails = 0, ignored = 0, size = 0;
try {
Expand Down Expand Up @@ -712,7 +713,7 @@ protected void afterErrors() {
// If JUnit failures are present, add them to the TestTracker.
junit.getFailures().forEach(failure -> {
String message = failure.getMessage() == null ? "" : " " + failure.getMessage();
TestTracker.testFailed("'" + test + "': " + message);
TestTracker.JUnitTestFailed(test, message);
Skript.exception(failure.getException(), "JUnit test '" + failure.getTestHeader() + " failed.");
});
SkriptJUnitTest.clearJUnitTest();
Expand All @@ -734,7 +735,7 @@ protected void afterErrors() {
// Delay server shutdown to stop the server from crashing because the current tick takes a long time due to all the tests
Bukkit.getScheduler().runTaskLater(Skript.this, () -> {
if (TestMode.JUNIT && !EffObjectives.isJUnitComplete())
TestTracker.testFailed(EffObjectives.getFailedObjectivesString());
EffObjectives.fail();

info("Collecting results to " + TestMode.RESULTS_FILE);
String results = new Gson().toJson(TestTracker.collectResults());
Expand Down Expand Up @@ -1261,7 +1262,7 @@ public static boolean isAcceptRegistrations() {
}

public static void checkAcceptRegistrations() {
if (!isAcceptRegistrations())
if (!isAcceptRegistrations() && !Skript.testing())
throw new SkriptAPIException("Registration can only be done during plugin initialization");
}

Expand Down
18 changes: 9 additions & 9 deletions src/main/java/ch/njol/skript/SkriptEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ private static void check(Event event, EventPriority priority) {
boolean hasTrigger = false;
for (Trigger trigger : triggers) {
SkriptEvent triggerEvent = trigger.getEvent();
if (triggerEvent.getEventPriority() == priority && Boolean.TRUE.equals(Task.callSync(() -> triggerEvent.check(event)))) {
if (
triggerEvent.getEventPriority() == priority
&& triggerEvent.canExecuteAsynchronously() ? triggerEvent.check(event) : Boolean.TRUE.equals(Task.callSync(() -> triggerEvent.check(event)))
) {
hasTrigger = true;
break;
}
Expand All @@ -130,7 +133,7 @@ private static void check(Event event, EventPriority priority) {

logEventStart(event);
}

boolean isCancelled = event instanceof Cancellable && ((Cancellable) event).isCancelled() && !listenCancelled.contains(event.getClass());
boolean isResultDeny = !(event instanceof PlayerInteractEvent && (((PlayerInteractEvent) event).getAction() == Action.LEFT_CLICK_AIR || ((PlayerInteractEvent) event).getAction() == Action.RIGHT_CLICK_AIR) && ((PlayerInteractEvent) event).useItemInHand() != Result.DENY);

Expand All @@ -155,15 +158,12 @@ private static void check(Event event, EventPriority priority) {
};

if (trigger.getEvent().canExecuteAsynchronously()) {
// check should be performed on the main thread
if (Boolean.FALSE.equals(Task.callSync(() -> triggerEvent.check(event))))
continue;
execute.run();
if (triggerEvent.check(event))
execute.run();
} else { // Ensure main thread
Task.callSync(() -> {
if (!triggerEvent.check(event))
return null;
execute.run();
if (triggerEvent.check(event))
execute.run();
return null; // we don't care about a return value
});
}
Expand Down
Loading