Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SkriptLang/Skript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.9.5
Choose a base ref
...
head repository: SkriptLang/Skript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jul 24, 2024

  1. Apply new conventions to lang package (#6918)

    * Update lang package to new annotation conventions, new warning conventions, and use try-with-resources for loggers
    
    * Apply suggestions from code review
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * Requested changes
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    3 people authored Jul 24, 2024
    Copy the full SHA
    2f4232d View commit details

Commits on Jul 27, 2024

  1. Copy the full SHA
    92c0fd1 View commit details

Commits on Aug 2, 2024

  1. Copy the full SHA
    c8aa674 View commit details

Commits on Aug 7, 2024

  1. Raise the minimum Java version to 17 (#6905)

    Require Java 17
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    APickledWalrus and sovdeeth authored Aug 7, 2024
    Copy the full SHA
    6da1216 View commit details

Commits on Aug 15, 2024

  1. Allows for multiple return types in ExpressionEntryData (#6873)

    * Allows for multiple return types in ExpressionEntryData
    - Changes the constructors to allow for multiple return types
    - Changes the calls to SkriptParser#parseExpression to pass in the array of types
    
    * Changes list to array and redirects existing constructors
    - Changes returnTypes field to an array
    - Adds 2 new constructors, one which has the flags parameter and the other that defaults to ALL_FLAGS
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    cheeezburga and sovdeeth authored Aug 15, 2024
    Copy the full SHA
    f6ae828 View commit details
  2. Add trailing empty string ignoring and tests to ExprJoinSplit (#6930)

    * init commit innit
    
    * minor touch ups
    
    * oops
    
    * fix annotation
    
    * oopsie
    
    * fixes
    
    * removed unused import
    
    * update annotation
    
    * added text
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Efnilite and sovdeeth authored Aug 15, 2024
    Copy the full SHA
    17c77f4 View commit details
  3. Adds some more taming syntax (#6850)

    * Adds tame syntax
    
    * Adds test
    
    * Adds Skript doc annotations
    
    * NotSoDelayed Suggestions
    
    Co-authored-by: NotSoDelayed <72163224+NotSoDelayed@users.noreply.github.com>
    
    * Suggestions
    - Removed 'de' as an option to untame a tameable entity
    - Adds untaming to test
    - Deletes value within variables instead of killing
    
    * Fixes test
    
    * Changed tests slightly
    
    * Auggestion
    
    Co-authored-by: NotSoDelayed <72163224+NotSoDelayed@users.noreply.github.com>
    
    * Suggestions
    
    * Changes to JetBrains nullable annotation
    
    ---------
    
    Co-authored-by: NotSoDelayed <72163224+NotSoDelayed@users.noreply.github.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    3 people authored Aug 15, 2024
    Copy the full SHA
    bc0fe53 View commit details

Commits on Aug 19, 2024

  1. Add condition type to fix parsing order (#5809)

    * Add condition type to fix parsing order
    
    * Add JUnit test
    
    * Move java imports backs
    
    * Move java imports backs
    
    * Complete tests
    
    * Change tests
    
    * Complete tests
    
    * Update src/test/skript/tests/regressions/5804-is-burning.sk
    TheLimeGlass authored Aug 19, 2024
    Copy the full SHA
    a4c107b View commit details

Commits on Aug 24, 2024

  1. Add explicit sort order to EffSort (#6997)

    * Add optional ascending, descending sort order to SortEff
    
    * Add version to Since annotation for explicit sort order
    
    * Change toString() to reflect change in syntax
    
    * Add missing space in EffSort#toString
    
    * Change "explicit order" to "sort order" for clarity
    
    * Revert "Change "explicit order" to "sort order" for clarity"
    
    This reverts commit ae11d23.
    
    * Update src/main/java/ch/njol/skript/effects/EffSort.java
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    TenFont and Moderocky authored Aug 24, 2024
    Copy the full SHA
    6b40d2e View commit details

Commits on Aug 30, 2024

  1. Timespan <-> Duration Conversion methods. (#6993)

    * Add duration conversion methods.
    
    * Add TemporalAmount & TemporalUnit methods.
    Moderocky authored Aug 30, 2024
    Copy the full SHA
    4e584b2 View commit details
  2. Add piglin bartering event (#6768)

    * Added on piglin bartering
    
    * Added bartering input
    
    * Added bartering output
    
    * Minor formatting/documentation fixes
    
    * Fixed IDE using wildcard import
    
    * Epically forgot space
    
    * Fixed review comments
    
    * Okay, should be good now
    
    * Added junit tests
    
    * Fix tests for <1.16 versions
    
    * uhh
    
    * Only register exprs if event exists
    
    * Remove plagiarism
    
    * Minor spelling mistake
    
    * Fixed errors
    
    * Fixed no completion
    
    * oopsie
    
    * tried parsing section
    
    * forgot "to console"
    
    * move to file loading
    
    * rename file
    
    * remove broadcast
    
    * Update src/main/java/ch/njol/skript/expressions/ExprBarterDrops.java
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * Update src/main/java/ch/njol/skript/expressions/ExprBarterDrops.java
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * Update src/main/java/ch/njol/skript/expressions/ExprBarterInput.java
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * Update src/test/skript/junit/EvtPiglinBarterTest.sk
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * Apply suggestions from code review
    
    Didn't realise this existed until now. Oops!
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * Fixed review stuff
    
    * Extra nls
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * oops
    
    * fixes
    
    * moar fixes
    
    * thanks pickle
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    4 people authored Aug 30, 2024
    Copy the full SHA
    de1a529 View commit details
  3. Update charged syntax (#6860)

    * Update CondIsCharged
    
    * Adds new test and updates effect
    - Also deletes old test
    
    * Fixes test
    - Wither skull wasn't spawning as I thought it was, changed to shoot effect
    
    * Apply suggestions from code review
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Suggestions
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    3 people authored Aug 30, 2024
    Copy the full SHA
    706c82f View commit details
  4. Operators reloading info (#6780)

    * Commit
    
    * Commit x2
    
    * whoops
    
    * Suggested
    
    * One last change
    
    * Commit
    
    * Commit x2
    
    * whoops
    
    * Suggested
    
    * One last change
    
    * change
    
    * yes?!
    
    * moved config
    
    * e
    
    * simplification
    
    * e
    
    * pickle please 🙏
    
    * stupid IDE
    
    * aaaaaaaaaaaaaaaaaa
    
    * Changes, once again
    
    * chagne
    
    * deleted left other thing from a pr that i didnt make
    
    * e
    
    * done
    
    * Cleanup + Remove config
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    3 people authored Aug 30, 2024
    Copy the full SHA
    c8cd975 View commit details

Commits on Sep 1, 2024

  1. Fix ExprBookAuthors performance Java 17 (#7023)

    * Fix ExprBookAuthors performance Java 17
    
    * Update src/main/java/ch/njol/skript/expressions/ExprBookAuthor.java
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    
    * Update ExprBookAuthor.java
    
    * Update src/main/java/ch/njol/skript/expressions/ExprBookAuthor.java
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * Update src/main/java/ch/njol/skript/expressions/ExprBookAuthor.java
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    4 people authored Sep 1, 2024
    Copy the full SHA
    cf64d58 View commit details
  2. Add SecFilter, refactor Variable and Variables slightly to accomodate. (

    #6912)
    
    * Add SecFilter, refactor Variable and Variables slightly to accomodate.
    
    * Messed up merge
    
    * realllly bad at merging
    
    * generify convertIfOldPlayer
    
    * use SectionNode#isEmpty()
    
    * small edits and implement variableIterator#remove()
    
    * Update src/main/java/ch/njol/skript/sections/SecFilter.java
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    ---------
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    sovdeeth and APickledWalrus authored Sep 1, 2024
    Copy the full SHA
    29c6764 View commit details

Commits on Sep 2, 2024

  1. Copy the full SHA
    0945caa View commit details

Commits on Sep 9, 2024

  1. Copy the full SHA
    72a8496 View commit details

Commits on Sep 19, 2024

  1. Generate JSON docs with Gson (#5738)

    * Start work on new json docs generation
    
    * Add more to the JSON
    
    * Add sections
    
    * Add ID generation to JSON docs
    
    * Fix SkriptCommand errors
    
    * Add license header
    
    * Test duplicate checker
    
    * Existing IDs actually start at 2
    
    * Address reviews
    
    * Remove test class
    
    * Address reviews
    
    * Address reviews
    
    * Try new way of generating IDs
    
    * Add license header
    
    * Fix nullable import
    
    * Add javadocs
    
    * Remove license headers
    
    * Address reviews
    
    * Address reviews
    
    * Address reviews
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Address reviews
    
    * Address reviews
    
    ---------
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    Pikachu920 and UnderscoreTud authored Sep 19, 2024
    Copy the full SHA
    30ab7d3 View commit details

Commits on Sep 21, 2024

  1. Remove good first issue labels when complete or pr available (#5905)

    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    TheLimeGlass and sovdeeth authored Sep 21, 2024
    Copy the full SHA
    7866bd6 View commit details

Commits on Sep 22, 2024

  1. Multiple Random Numbers Support (#5518)

    * Multiple Random Numbers Support
    
    Took 26 minutes
    
    * Change pattern a wee bit.
    
    Took 2 minutes
    
    * Use parse tags instead of parse marks.
    
    Took 3 minutes
    
    * Requested Changes
    
    Took 15 minutes
    
    * Requested Changes
    
    Took 3 minutes
    
    * Apply suggestions from code review
    
    Co-authored-by: Ayham Al Ali <20037329+AyhamAl-Ali@users.noreply.github.com>
    
    * Requested changes, added tests, bug fixes
    
    * Add check for literal 1 in isSingle
    
    * Use Integer instead of Number
    
    * forgot to delete the infinity tests
    
    * Update skript-aliases
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Ayham Al Ali <20037329+AyhamAl-Ali@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    4 people authored Sep 22, 2024
    Copy the full SHA
    14b9ed3 View commit details
  2. Add Player Chat Completion Suggestions (#6419)

    * Add player chat completion suggestions
    
    * Add method exists check
    
    * Syntax adjustment and remove DataFlowIssue suppression
    
    * Docs improvements
    
    * Requested changes
    
    * Update src/main/java/ch/njol/skript/expressions/ExprPlayerChatCompletions.java
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Remove license header (#6684)
    
    * Java 17 ready
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    3 people authored Sep 22, 2024
    Copy the full SHA
    83808a1 View commit details
  3. Entity Potion Effect Event (#6532)

    * Entity Potion Effect Event and event-values
    
    * Updated syntax for EvtEntityPotion, and readded the imports to EventValues.
    
    * Forgot to change e to event.
    
    * Added suggested changes :)
    
    * silly me
    
    * even sillier me (how did I manage to do that)
    
    * even sillier me (how did I manage to do that)
    
    * I don't get why the build is failing
    
    * BRO
    
    * Added type stuff, and made check a lot better
    
    * Changes
    
    * change
    
    * done
    
    * resolve conflict
    
    * Update src/main/java/ch/njol/skript/classes/data/BukkitClasses.java
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    3 people authored Sep 22, 2024
    Copy the full SHA
    c4c5560 View commit details
  4. Fixes lang file issues (#7111)

    * adds more entity potion causes and adds the type
    
    * Update default.lang
    
    * requested changes
    EquipableMC authored Sep 22, 2024
    Copy the full SHA
    45ce386 View commit details

Commits on Oct 1, 2024

  1. Copy the full SHA
    6d4582e View commit details
  2. Copy the full SHA
    9e61f38 View commit details

Commits on Oct 3, 2024

  1. Fixes 5804-is-burning regression test (#7124)

    * Fixes 5804-is-burning regression test
    - Previously used a wait to allow the pig's fire ticks to update, but waits aren't allowed in tests, so now just uses the ignite effect
    
    * Suggestions
    
    Co-authored-by: Efy <35348263+Efnilite@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Efy <35348263+Efnilite@users.noreply.github.com>
    cheeezburga and Efnilite authored Oct 3, 2024
    Copy the full SHA
    b785591 View commit details

Commits on Oct 12, 2024

  1. Fixes missing and/or warnings (#7125)

    Fixes missing and/or warnings in ExprJoinSplit.sk and SecFilter.sk
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    cheeezburga and sovdeeth authored Oct 12, 2024
    Copy the full SHA
    322b81c View commit details

Commits on Oct 13, 2024

  1. Internal Events API (#5552)

    * Combine activity events and add unload event
    
    * Add global script events
    
    * Add EventRegister API
    
    * Javadoc improvements
    
    * Refactoring
    
    * Cleanup and additional refactoring
    
    * Add ScriptLoadEvent and ScriptInitEvent
    
    * Add PreScriptInitEvent
    
    This is an alternative for the now-deprecated Bukkit implementation
    
    * Minor javadoc corrections
    
    * Oopsie! add license headers
    
    * Requested formatting changes
    
    * Javadoc tweaks
    
    * Fix script load triggering
    
    * Remove license headers
    
    * Update class and method names
    
    * Formatting tweaks
    
    * Refactor event classes into appropriate locations
    
    The event classes have been refactored as inner classes of the classes they concern. This is to help accomdate future API changes (e.g. to ParserInstance, ScriptLoader, etc.) where the events may need to change.
    
    * Add Event parent class for type restriction
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    APickledWalrus and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    751c102 View commit details
  2. 1.19.4 displays (#5601)

    * Fix gradle temp
    
    * Start on displays
    
    * Save
    
    * More work
    
    * update gradle.build
    
    * stash
    
    * Progress so far
    
    * Finish bulk add
    
    * Finalize so far
    
    * Minimize adventure api
    
    * Fix static class check for not 1.19.4
    
    * Fix missing display classinfo in pattern under 1.19.4
    
    * Fix missing quaternions classinfo in pattern under 1.19.4
    
    * Make sure test runs on only 1.19.4
    
    * Address reviews and fix java 8
    
    * Apply suggestions from code review
    
    Co-authored-by: sovdee <ethansovde@gmail.com>
    
    * Move classes
    
    * Apply changes
    
    * Move classes
    
    * Class rename
    
    * Update to Spigot's fix to TextAlignment
    
    * Return null when using w of vector
    
    * Update src/main/java/ch/njol/skript/expressions/ExprXYZComponent.java
    
    Co-authored-by: sovdee <ethansovde@gmail.com>
    
    * Use brackets
    
    * Add entity hiding
    
    * Add property init values for displays
    
    * 1.19.4 check
    
    * Add rotate syntaxes
    
    * Change example
    
    * Fix tests
    
    * shadow syntax missing
    
    * Change setting
    
    * Revert change
    
    * Update src/main/java/ch/njol/skript/conditions/CondCanSee.java
    
    * Fix imports from master merge
    
    * Get tests working
    
    * Add color reset
    
    * Update ExprXYZComponent.java
    
    * Update DisplayData.java
    
    * Update DisplayData.java
    
    * Change the package naming and merge item into its own class
    
    * Add versioning for hide effect
    
    * Add versioning for hide effect
    
    * Change tests
    
    * Update submodule skript-aliases
    
    * Fix tests
    
    * Fix tests
    
    * Fix tests
    
    * Apply suggestions from code review
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Apply changes
    
    * Add axis angle
    
    * Add axis angle
    
    * Update skript-aliases
    
    * fix merge error
    
    * Remove axisangle and only present quaternion to users
    
    * Add tests for basic quaternion features, cleanup and fix bugs with ExprXYZComponent, add tests
    
    Notable changes include changing float comparison behavior (needs discussion) and allowing multiple vectors/quaternions to be changed at once (will overwrite list indices, needs discussion)
    
    * Add ExprQuaternionAxisAngle and tests. Change float comparison to use dynamic epsilon value.
    
    * Temporary change to build.gradle for java 17
    
    * Revert "Update src/main/java/ch/njol/skript/conditions/CondCanSee.java"
    
    This reverts commit 3da7b37.
    
    * Reverts entity hiding commits in favor of #6867
    
    Shouldn't be in the scope of this PR.
    
    * version check for EQAA and displaydata cleanup
    
    * force 'rotation' in EQAA, fix classdef error, add itemtypes to block display entitydata pattern, add tests for display entitydata
    
    Not sure wh
    
    * Clean up colorOf, add tests, add alpha parameter to rgb function and color tostring, add rgba factory method + constructor
    
    Discussion needed surrounding type checking in colorof acceptChange
    
    * update Nullable annotations to jetbrains
    
    * Fix <1.19 errors (just for actions) and fix subtle issues with xyz component changer
    
    * rename package to bukkit
    
    * finish package refactor
    
    * Add tests for billboarding, rework display brightness and add tests, move joml utilities
    
    * tests + allow setting override to a single number
    
    * tests, cleanup, and bug fixes for glow override and hegiht/width
    
    * Interpolation and Shadow tests + correct reset value for shadow strength + guard against NaN and init
    
    * Tests and cleanup for teleportation duration, remove number from changers for tp duration and interpolation delay/duration
    
    * Transformation tests, cleanup, bugfixes. Removed unnecessary Joml utils class.
    
    * wrong version check for teleportation duration
    
    * Display view range tests, cleanup, finite guard, switch to Timespan#getAs
    
    * strip licenses
    
    * cleanup, tests for ItemDisplayTransfrom. Fixed default from being FIXED to NONE, changed lang for NONE to be no transform to avoid confusion
    
    * Remove ItemOfItemDisplay (redundant), cleanup/test the text display expressions.
    
    * small cleanup to textdisplayexprs and rename ItemFrameSlot to be more generic
    
    * rework ExprRotate
    
    * Completely rework rotation with new Rotator API. Add support for quaternions + displays in EffRotate
    
    * cleanup rotations - java 17 tests will fail until legacy tests are removed
    
    * Fix bugs with rotation, adds tests
    
    * Add drop shadow syntax and small cleanup of ExprTextOf
    
    * See through blocks syntax
    
    * Update ExprRotate.java
    
    * remove extra [a]'s
    
    * whoops! reverts a change to number accuracy config done for testing
    
    * Module-ize, package infos, remove mc version checks
    
    * rename display.expressions package, use for loops, move displaydata
    
    * display data improvements
    
    * requested changes 1
    
    * update switches and remove banana
    
    * requested changes 2
    
    * Apply suggestions from code review
    
    Co-authored-by: cheeezburga <47320303+cheeezburga@users.noreply.github.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: cheeezburga <47320303+cheeezburga@users.noreply.github.com>
    
    * fix expritemofentity description
    
    * Apply suggestions from code review
    
    Co-authored-by: cheeezburga <47320303+cheeezburga@users.noreply.github.com>
    
    * Update ExprDisplayHeightWidth.java
    
    * Apply suggestions from code review
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * requested changes 2 + rotator docs
    
    * requested changes
    
    * Apply suggestions from code review
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * requested changes!
    
    ---------
    
    Co-authored-by: sovdee <ethansovde@gmail.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: cheeezburga <47320303+cheeezburga@users.noreply.github.com>
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    6 people authored Oct 13, 2024
    Copy the full SHA
    2b3c828 View commit details
  3. Added gamemode to CondIsInvulnerable.java (#6741)

    * Added gamemode to CondIsInvulnerable.java
    
    Took 1 hour 13 minutes
    
    * Update src/main/java/ch/njol/skript/conditions/CondIsInvulnerable.java
    
    example fixed
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Update src/main/java/ch/njol/skript/conditions/CondIsInvulnerable.java
    
    since* fixed
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Update src/main/java/ch/njol/skript/conditions/CondIsInvulnerable.java
    
    only allowing entities and gamemodes*
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Update src/main/java/ch/njol/skript/conditions/CondIsInvulnerable.java
    
    i literally forgot about curly brackets for a sec
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Added methodExists check
    
    Took 10 minutes
    
    * checks if the method for gamemodes exists when registering the condition, fixed typo
    
    Took 9 minutes
    
    * all gamemodes over variable in example
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    * tests
    
    Took 4 minutes
    
    * Refactor + space
    
    Took 5 minutes
    
    * Update src/test/skript/tests/syntaxes/conditions/CondIsInvulnerable.sk
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * updated test
    
    Took 8 minutes
    
    * updated test
    
    Took 2 minutes
    
    * Update src/test/skript/tests/syntaxes/conditions/CondIsInvulnerable.sk
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Update src/test/skript/tests/syntaxes/conditions/CondIsInvulnerable.sk
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Update CondIsInvulnerable.sk
    
    * Update CondIsInvulnerable.sk
    
    ---------
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    4 people authored Oct 13, 2024
    Copy the full SHA
    0f320f2 View commit details
  4. Variable Backup Files Purger (#6851)

    * Starter Commits
    
    * Commit 2
    
    * Commit 3
    
    * Removed un-needed import + details to config
    
    * Fixed config.sk
    
    * Suggestion Changes
    
    Changed to primitive java types
    Added checks within the method incase called manually by a user.
    Changed config option
    Add config description
    
    * Revert
    
    Reverted back to defining how many files a user wants to keep
    Sovde and eren agreed upon so
    
    * Config Update
    
    Added info on what the user can not set the options to.
    Can be removed if needed.
    
    * One Liner Change
    
    Changed to a 1 liner option in config
    Changed method handler to support the new option
    Changed description in config
    
    * More Changes...
    
    Added the option to all other applicable databases.
    Changed function to support other databases.
    Moved the main description of the option to the top database in the config.
    Re-worded the description.
    
    * Fixed Integer.class
    
    * Config Typos Fixed
    
    * Disable Backups
    
    Added, The ability to put 0
    Added, 0 does not call "startBackupTask"
    Added, 0 deletes all files in backup directory
    Changed, Config for putting 0
    Added, warning for putting 0
    Changed, "backupPurge" method to allow 0 as a parameter
    Changed, filters files array only if tokeep > 0
    
    * Test Class
    
    Added Test Class
    Tests levels of deletion
    Tests invalid input
    
    Note: `BellEvents.sk` causes `JUnitQuick` to fail
    
    * Requested Changes
    
    Changed, config.sk description
    Changed, variable names
    Added, extra info to the exception message
    Removed, `Final`s
    
    * IllegalArgumentException
    
    Added, Throw IllegalArgumentException into method
    Added, IllegalArgumentException in the catch
    Changed, Expected exception to be thrown in test class
    
    * Requested Changes
    
    Changed, var name for the `file` in `backupPurge`
    Added, Javadocs for method
    
    * Parameter Name Change
    
    So it doesnt look like its strictly only for .csv files
    
    * Fix Indentation
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    TheAbsolutionism and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    3420038 View commit details
  5. Adds some command block syntax (#6859)

    * Adds command block syntax
    - An expression to get/set the command of a command block or minecart with command block
    - An effect and condition for whether a command block is conditional or not
    - Tests for both
    
    * Adds Skript annotations
    
    * Apply suggestion from review
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Suggestions
    
    * Hopefully fixes tests
    
    * Hopefully fixes tests
    
    * Uses setNegated and hopefully fixes tests
    
    * Suggestions
    
    * Suggestions and stuff
    
    * Changes effect pattern to be more clear
    
    * Fixes test syntax
    
    * Pattern matching in CondIsCommandBlockConditional
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    22dfe9f View commit details
  6. Adds domestication syntax (#6861)

    * Adds domestication syntax
    - An expression with changers
    - A test for the expression
    
    * Hopefully fixes tests
    
    * Apply suggestions from code review
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Suggestions
    
    * Test suggestions
    
    * Removes reset changer and (hopefully) fixes tests
    
    * Suggestions
    
    * Suggestions
    
    * Adds domestication syntax
    - An expression with changers
    - A test for the expression
    
    * Hopefully fixes tests
    
    * Apply suggestions from code review
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Suggestions
    
    * Test suggestions
    
    * Removes reset changer and (hopefully) fixes tests
    
    * Suggestions
    
    * Suggestions
    
    * Suggestions and some changes
    
    * Suggestion
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    d638d16 View commit details
  7. Add "Time Until" to ExprTimeSince and Add CondPastFuture (#6203)

    * Time Until
    
    * ghost of christmas past
    
    Adds condition for checking whether dates are in the past or the future
    
    * Update CondPastFuture.java
    
    * Update CondPastFuture.java
    
    * Make tests more reliable
    
    * Requested changes
    
    * requested changes, fix merge issue
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    sovdeeth and Moderocky authored Oct 13, 2024
    Copy the full SHA
    33ebb8f View commit details
  8. Add cuboid syntax to ExprEntities (#6900)

    * Add method to search cuboids
    
    * Remove wait
    
    * Update imports
    
    * More descriptive variables
    
    * Improve readability of #toString
    
    * Remove unnecessary {}
    
    * Update src/test/skript/tests/syntaxes/expressions/ExprEntities.sk
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Use correct variables
    
    * Less technical terminology in description
    
    * Change annotation
    
    * Check if world is null
    
    * Add more spawn locations
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Phill310 and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    6b4a24d View commit details
  9. Warning when reloading Skript. (#6958)

    * Commit
    
    * Commit
    
    * Changes
    
    * Unused import
    
    * change
    
    * i am an idiot
    
    * Slight Change
    
    * suggested changes
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    cf244fa View commit details
  10. Unreachable Code (#6960)

    * Add a warning for unreachable code
    
    * Clean up EffSuppressWarnings and add the ability to disable the unreachable code warning using config or the suppress warning effect
    
    * Add comments
    
    * Requested Changes
    
    * Generify compareTo method
    
    * Add docs to ExecutionIntent
    
    * Fix lines using spaces instead of tabs for indentation (unsure how this even happened in the first place)
    
    * Add ExecutionIntent to EffContinue, and fix its toString
    
    * Improve SecLoop's intent detection
    
    * Use instanceof pattern matching
    
    * Use MoreObject.toStringHelper
    
    * Replace all space indentations with tabs
    
    * Add simple helper methods for getting relative sections
    
    * Add comments to SecLoop#guaranteedToLoop
    
    * Capitalize the 'C' in EffExit's errors
    
    * Return a copy of the sections list rather than a view in the section helper methods
    
    * Make EffContinue's and EffExit's patterns stricter
    
    * Fix ArrayOutOfBoundsException when using Section.getSections of a type and there are no sections present
    
    * Update javadocs
    
    * Requested Changes
    
    * Update src/main/java/ch/njol/skript/sections/SecConditional.java
    
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    59d3bc4 View commit details
  11. ExprPrefixSuffix Cleanup (#6970)

    * Initial Commit
    
    * More cleanup
    
    * Method move around
    
    * Suggested changes
    
    * Suggested changes
    
    * Update src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Update src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    4 people authored Oct 13, 2024
    Copy the full SHA
    9ffced2 View commit details
  12. Connect Changes. (#6989)

    * Initial Commit
    
    * Slight change.
    
    * Suggested Changes
    
    * Suggested Changes
    
    * Slight change
    
    * Suggested Changes
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    0ff13e7 View commit details
  13. Shortened Timespans (again) (#7001)

    * Initial Commit
    
    * fix no space at bottom of file
    
    * Fix some errors
    
    * Fix everything
    
    * Fix timespan parsing + tests
    
    * suggested changes
    
    * fixes
    
    * Update src/test/skript/tests/misc/timespans.sk
    
    * Update timespans.sk
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    8166f1e View commit details
  14. Updates EffCharge and CondIsCharged (#7013)

    * Updates EffCharge and CondIsCharged, and adds wither support
    
    * Fixes tests
    
    * Suggestions
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    d05ed06 View commit details
  15. Adds entity sound expression and test (#7019)

    * Adds entity sound expression and test
    
    * Apply suggestions from code review
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    
    * Suggestions and stuff
    
    * Some changes
    - Updates fall damage pattern to not conflict with new block sound PR
    - Fixes some other patterns missing some small details
    - Adds Skript doc annotations
    - Adds new ambient sound
    
    * Implements an enum to handle some logic in a nicer way and suggested changes
    
    * Just some small updates
    
    ---------
    
    Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    7cf5d79 View commit details
  16. Add underscore formatting in numbers (#7030)

    * init commit innit
    
    * update test name, var name
    
    * moved file
    
    * add double test
    
    * update invalid tests to test more underscores
    
    * remove multiple _
    
    * Update src/test/skript/tests/misc/underscores in numbers.sk
    
    Co-authored-by: Asleepp <119438940+Asleeepp@users.noreply.github.com>
    
    * forgor
    
    * fixed error
    
    ---------
    
    Co-authored-by: Asleepp <119438940+Asleeepp@users.noreply.github.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    97055a2 View commit details
  17. Adds block sound expression and test (#7040)

    * Adds block sound syntax
    - Allows getting the break, fall, hit, place, and step sound of a block/blockdata/itemtype
    
    * Suggestions
    
    * Suggestion
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Implements SoundType enum to get a sound given a group, and makes tests better
    - This also reduces some annoying switch stuff with the soundType from before
    
    * Fixes tests failing due to 1.19 not using INTENTIONALLY_EMPTY sound
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    cheeezburga and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    99731b0 View commit details
  18. Wolf Variants (#7041)

    * Starter Files
    
    * Notes
    
    * Typo :)
    
    * Fixxy Fix
    
    Fixed, inability to operate on MC versions not containing 'Wolf.Variant'
    Added, required data/types into lang
    Added, test to spawn variant wolves
    Added, spawning a wolf without a provided variant, will  choose a random one (Like Cats)
    
    * Requested Changes
    
    * Requested Changes - 2
    
    * New Line + No Spacing
    
    * Requested Change
    
    * Conflict
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    TheAbsolutionism and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    b4887d7 View commit details
  19. Adds PropertyExpression helper method (#7043)

    * Adds PropertyExpression getPatterns helper method
    
    * Suggestion
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Throws exception instead of returning null
    
    * Fixes getPatterns method to respect registerDefault's behaviour
    
    * Adds new methods and changes getPatterns method
    - Adds getDefaultPatterns method
    - Now uses patternsOf(property, fromType, defaultExpr) for both getPatterns and getDefaultPatterns
    
    * Resolves some weird issues
    
    * Optimizes imports
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    cheeezburga and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    0af4c3a View commit details
  20. Adds last death location expression and JUnit test (#7045)

    * Adds last death location expression, and tries to add JUnit test
    
    * Fixes JUnit test
    
    * Adds Skript doc annotations
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    cheeezburga and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    ad654cf View commit details
  21. Piglin Barter Fix (#7046)

    * Starter Commit
    
    * Final Commit
    
    Removed the 'send'
    
    * Last Commit (Hopefully)
    
    No clue how the file got renamed
    Took out the version checking stuff
    
    * 100% last commit
    
    Removed version checking and needing to load/unload the actual test skript
    
    * Fixed Indentation
    
    Thanks IntelliJ
    
    * Fixed test
    
    * Update src/test/skript/junit/EvtPiglinBarter.sk
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    TheAbsolutionism and sovdeeth authored Oct 13, 2024
    Copy the full SHA
    e926b38 View commit details
  22. Add async JUnit tests, on broadcast event and hover list test (#7053)

    * init commit
    
    * add broadcasting
    
    * add broadcasting tests
    
    * add test for async test
    
    * make broadcast get called async
    
    * update events
    
    * update ExprMessage
    
    * fixed regular tests
    
    * fixed remove in ExprHoverList
    
    * fixed burning tests not completing
    
    * use pattern matching
    
    * remove double if using junit check, add starting values
    
    * revert ExprHoverList changes
    
    * revert ExprHoverList changes
    
    * fix tests
    
    * Update src/main/java/ch/njol/skript/Skript.java
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * Update src/main/java/ch/njol/skript/Skript.java
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    
    * update annot
    
    * oops
    
    ---------
    
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    Co-authored-by: Moderocky <admin@moderocky.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    b36ca00 View commit details
  23. Auto Generate Missing Aliases (#7073)

    * black magic
    
    * change generation format
    
    * change generation format
    
    ---------
    
    Co-authored-by: Moderocky <admin@moderocky.com>
    Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
    3 people authored Oct 13, 2024
    Copy the full SHA
    0d19871 View commit details
Showing 1,625 changed files with 45,991 additions and 32,768 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ body:
## Guidelines
Please make sure you are running the latest version of Skript on a supported server platform and version.
Try to make sure there are no issues of this same problem currently open either.
As of the release of Skript 2.10, the oldest supported version has been raised to 1.19.4.
Any issues created for versions older than 1.19.4 will not be looked into or fixed unless the issue persists on supported versions.
- type: textarea
attributes:
label: Skript/Server Version
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
version: 2
updates:
- package-ecosystem: "gitsubmodule"
target-branch: "dev/patch"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- package-ecosystem: "github-actions"
target-branch: "dev/patch"
directory: "/"
22 changes: 22 additions & 0 deletions .github/workflows/github-issues/issues-labeled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: When labels are modified, run actions.

on:
issues:
types: [labeled]

jobs:
remove-good-first-issue-label:
if: ${{ github.event.label.name == 'completed' || github.event.label.name == 'PR available'}}
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ["good first issue"]
})
35 changes: 0 additions & 35 deletions .github/workflows/java-11-builds.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/java-17-builds.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java 17 CI (MC 1.17-1.20.4)
name: Java 17 CI (MC 1.19.4-1.20.4)

on:
push:
29 changes: 0 additions & 29 deletions .github/workflows/junit-11-builds.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/junit-17-builds.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: JUnit (MC 1.17-1.20.4)
name: JUnit (MC 1.19.4-1.20.4)

on:
push:
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "skript-aliases"]
path = skript-aliases
url = https://github.com/SkriptLang/skript-aliases
branch = minimized-aliases
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@ Skript requires **Spigot** to work. You heard it right, **CraftBukkit** does *no
**Paper**, which is a fork of Spigot, is recommended; it is required for some
parts of Skript to be available.

Skript supports only the **latest** patch versions of Minecraft 1.13+.
For example, this means that 1.16.5 is supported, but 1.16.4 is *not*.
Skript supports only the **latest** patch versions of Minecraft 1.19 and newer.
For example, this means that 1.19.4 is supported, but 1.19.3 is *not*.
Testing with all old patch versions is not feasible for us.

Minecraft 1.12 and earlier are not, and will not be supported. New Minecraft
@@ -77,15 +77,14 @@ Skript has some tests written in Skript. Running them requires a Minecraft
server, but our build script will create one for you. Running the tests is easy:

```
./gradlew (quickTest|skriptTest|skriptTestJava11|skriptTestJava17|skriptTestJava21)
./gradlew (quickTest|skriptTest|skriptTestJava17|skriptTestJava21)
```

<code>quickTest</code> runs the test suite on newest supported server version.
<code>skriptTestJava21</code> (1.20.6+) runs the tests on Java 21 supported versions.
<code>skriptTestJava17</code> (1.17-1.20.4) runs the tests on Java 17 supported versions.
<code>skriptTestJava11</code> (1.13-1.16) runs the tests on Java 11 supported versions.
<code>skriptTestJava17</code> (1.19.4-1.20.4) runs the tests on Java 17 supported versions.
<code>skriptTest</code> runs the tests on all versions.
That is, it runs skriptTestJava11, skriptTestJava17, and skriptTestJava21.
That is, it runs skriptTestJava17, and skriptTestJava21.

By running the tests, you agree to Mojang's End User License Agreement.

25 changes: 15 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -30,11 +30,19 @@ dependencies {
shadow group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.2'
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.3.2'

implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.21.3-R0.1-SNAPSHOT'
implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.21.4-R0.1-SNAPSHOT'
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'

// bundled with Minecraft 1.19.4+ for display entity transforms
implementation group: 'org.joml', name: 'joml', version: '1.10.5'

// Plugin hook libraries
implementation group: 'com.sk89q.worldguard', name: 'worldguard-legacy', version: '7.0.0-SNAPSHOT', {
exclude group: 'org.bukkit', module: 'bukkit'
}
implementation group: 'net.milkbowl.vault', name: 'Vault', version: '1.7.3', {
exclude group: 'org.bstats', module: 'bstats-bukkit'
exclude group: 'org.bukkit', module: 'bukkit'
}

implementation fileTree(dir: 'lib', include: '*.jar')
@@ -75,7 +83,7 @@ task build(overwrite: true, type: ShadowJar) {
from sourceSets.main.output
}

// Excludes the tests for the build task. Should be using JUnitQuick, JUnitJava21, JUnitJava17, JUnitJava11, skriptTest, quickTest.
// Excludes the tests for the build task. Should be using JUnitQuick, JUnitJava21, JUnitJava17, skriptTest, quickTest.
// We do not want tests to run for building. That's time consuming and annoying. Especially in development.
test {
exclude '**/*'
@@ -238,11 +246,10 @@ void createTestTask(String name, String desc, String environments, int javaVersi

def java21 = 21
def java17 = 17
def java11 = 11

def latestEnv = 'java21/paper-1.21.3.json'
def latestEnv = 'java21/paper-1.21.4.json'
def latestJava = java21
def oldestJava = java11
def oldestJava = java17

def latestJUnitEnv = latestEnv
def latestJUnitJava = latestJava
@@ -265,23 +272,21 @@ int envJava = project.property('testEnvJavaVersion') == null ? latestJava : Inte
createTestTask('quickTest', 'Runs tests on one environment being the latest supported Java and Minecraft.', environments + latestEnv, latestJava, 0)
createTestTask('skriptTestJava21', 'Runs tests on all Java 21 environments.', environments + 'java21', java21, 0)
createTestTask('skriptTestJava17', 'Runs tests on all Java 17 environments.', environments + 'java17', java17, 0)
createTestTask('skriptTestJava11', 'Runs tests on all Java 11 environments.', environments + 'java11', java11, 0)
createTestTask('skriptTestDev', 'Runs testing server and uses \'system.in\' for command input, stop server to finish.', environments + env, envJava, 0, Modifiers.DEV_MODE, Modifiers.DEBUG)
createTestTask('skriptProfile', 'Starts the testing server with JProfiler support.', environments + latestEnv, latestJava, -1, Modifiers.PROFILE)
createTestTask('genNightlyDocs', 'Generates the Skript documentation website html files.', environments + env, envJava, 0, Modifiers.GEN_NIGHTLY_DOCS)
createTestTask('genReleaseDocs', 'Generates the Skript documentation website html files for a release.', environments + env, envJava, 0, Modifiers.GEN_RELEASE_DOCS)
tasks.register('skriptTest') {
description = 'Runs tests on all environments.'
dependsOn skriptTestJava11, skriptTestJava17, skriptTestJava21
dependsOn skriptTestJava17, skriptTestJava21
}

createTestTask('JUnitQuick', 'Runs JUnit tests on one environment being the latest supported Java and Minecraft.', environments + latestJUnitEnv, latestJUnitJava, 0, Modifiers.JUNIT)
createTestTask('JUnitJava21', 'Runs JUnit tests on all Java 21 environments.', environments + 'java21', java21, 0, Modifiers.JUNIT)
createTestTask('JUnitJava17', 'Runs JUnit tests on all Java 17 environments.', environments + 'java17', java17, 0, Modifiers.JUNIT)
createTestTask('JUnitJava11', 'Runs JUnit tests on all Java 11 environments.', environments + 'java11', java11, 0, Modifiers.JUNIT)
tasks.register('JUnit') {
description = 'Runs JUnit tests on all environments.'
dependsOn JUnitJava11, JUnitJava17, JUnitJava21
dependsOn JUnitJava17, JUnitJava21
}

// Build flavor configurations
5 changes: 2 additions & 3 deletions code-conventions.md
Original file line number Diff line number Diff line change
@@ -195,9 +195,8 @@ Your comments should look something like these:
## Language Features

### Compatibility
[//]: # (To be updated for 2.10 for Java 17)
* Contributions should maintain Java 11 source/binary compatibility, even though compiling Skript requires Java 21
- Users must not need JRE newer than version 11
* Contributions should maintain Java 17 source/binary compatibility, even though compiling Skript requires Java 21
- Users must not need JRE newer than version 17
* Versions up to and including Java 21 should work too
- Please avoid using unsafe reflection
* It is recommended to make fields final, if they are effectively final
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ org.gradle.parallel=true

groupid=ch.njol
name=skript
version=2.9.5
version=2.10.1
jarName=Skript.jar
testEnv=java21/paper-1.21.3
testEnv=java21/paper-1.21.4
testEnvJavaVersion=21
2 changes: 1 addition & 1 deletion skript-aliases
89 changes: 89 additions & 0 deletions src/main/java/ch/njol/skript/ModernSkriptBridge.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package ch.njol.skript;

import org.jetbrains.annotations.Unmodifiable;
import org.skriptlang.skript.Skript;
import org.skriptlang.skript.addon.SkriptAddon;
import org.skriptlang.skript.localization.Localizer;
import org.skriptlang.skript.registration.SyntaxRegistry;
import org.skriptlang.skript.util.Registry;

import java.util.Collection;
import java.util.function.Supplier;

/**
* Bridge for interacting with the modern API classes from {@link org.skriptlang.skript}.
*/
final class ModernSkriptBridge {

private ModernSkriptBridge() { }

/**
* Similar to {@link Skript#unmodifiableView()}, but permits addon registration.
*/
public static final class SpecialUnmodifiableSkript implements Skript {

private final Skript skript;
private final Skript unmodifiableSkript;

public SpecialUnmodifiableSkript(Skript skript) {
this.skript = skript;
this.unmodifiableSkript = skript.unmodifiableView();
}

@Override
public SkriptAddon registerAddon(Class<?> source, String name) {
return skript.registerAddon(source, name);
}

@Override
public @Unmodifiable Collection<SkriptAddon> addons() {
return unmodifiableSkript.addons();
}

@Override
public Class<?> source() {
return unmodifiableSkript.source();
}

@Override
public String name() {
return unmodifiableSkript.name();
}

@Override
public <R extends Registry<?>> void storeRegistry(Class<R> registryClass, R registry) {
unmodifiableSkript.storeRegistry(registryClass, registry);
}

@Override
public void removeRegistry(Class<? extends Registry<?>> registryClass) {
unmodifiableSkript.removeRegistry(registryClass);
}

@Override
public boolean hasRegistry(Class<? extends Registry<?>> registryClass) {
return unmodifiableSkript.hasRegistry(registryClass);
}

@Override
public <R extends Registry<?>> R registry(Class<R> registryClass) {
return unmodifiableSkript.registry(registryClass);
}

@Override
public <R extends Registry<?>> R registry(Class<R> registryClass, Supplier<R> putIfAbsent) {
return unmodifiableSkript.registry(registryClass, putIfAbsent);
}

@Override
public SyntaxRegistry syntaxRegistry() {
return unmodifiableSkript.syntaxRegistry();
}

@Override
public Localizer localizer() {
return unmodifiableSkript.localizer();
}
}

}
18 changes: 0 additions & 18 deletions src/main/java/ch/njol/skript/PatcherTool.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
/**
* This file is part of Skript.
*
* Skript is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Skript is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Skript. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright Peter Güttinger, SkriptLang team and contributors
*/
package ch.njol.skript;

import java.io.IOException;
Loading