Skip to content

Add loadDelayableLinkedCode to SectionUtils#8557

Merged
APickledWalrus merged 5 commits intoSkriptLang:dev/featurefrom
ahmadmsaleem:feature/loadlinkedcode-allow-delays
May 5, 2026
Merged

Add loadDelayableLinkedCode to SectionUtils#8557
APickledWalrus merged 5 commits intoSkriptLang:dev/featurefrom
ahmadmsaleem:feature/loadlinkedcode-allow-delays

Conversation

@ahmadmsaleem
Copy link
Copy Markdown
Contributor

@ahmadmsaleem ahmadmsaleem commented Apr 17, 2026

Problem

SectionUtils.loadLinkedCode can use type hints from outside, but it does not allow delays inside its code.
So, if a section runs its code later, like a delay section, it cannot use this function.

Solution

  • Added loadDelayableLinkedCode: same type hint sharing, but permits delays.
  • Existing loadLinkedCode is unchanged.
  • Shared logic lives in a private helper.

Testing Completed

No new tests. Existing loadLinkedCode behavior is unchanged, so current callers (spawn, shoot, create worldborder, etc.) are covered by the existing suite. The new method will be exercised by the follow up delay section PR.

Supporting Information

Prerequisite for ahmadmsaleem:feature/delay-section


Related: ahmadmsaleem:feature/delay-section
AI assistance: Claude Code (Opus 4.7) - drafted method split and Javadoc

@ahmadmsaleem ahmadmsaleem requested review from a team as code owners April 17, 2026 19:52
@ahmadmsaleem ahmadmsaleem requested review from UnderscoreTud and cheeezburga and removed request for a team April 17, 2026 19:52
@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label Apr 17, 2026
Comment thread src/main/java/ch/njol/skript/lang/util/SectionUtils.java Outdated
@skriptlang-automation skriptlang-automation Bot removed the needs reviews A PR that needs additional reviews label Apr 19, 2026
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Apr 20, 2026
Copy link
Copy Markdown
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Merge in 2.16 Releases May 5, 2026
@APickledWalrus APickledWalrus merged commit 1b0196b into SkriptLang:dev/feature May 5, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Merge to Done - Awaiting Release in 2.16 Releases May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Projects

Status: Done - Awaiting Release

Development

Successfully merging this pull request may close these issues.

4 participants