COWMODSКаталог модов

skLambda

Skript addon that adds lambda functions and listeners to Skript.

Автор: eult3875обновлён 17 сент. 2026 г.
Утилиты

Описание

Cover

A Skript addon that lets you treat behavior as a value, and cut a lot of boilerplate while you're at it. It adds:

  1. Lambdas: Small functions you save in a variable, pass around, and run later. They support closures, default parameters, and piping.
  2. Predicates: Reusable yes/no tests you can combine with all, any, or none, or count how many pass.
  3. List operations: Map, reduce, scan, zip, sort, highest/lowest, and paging, without writing the loops yourself.
  4. Self-cleaning listeners: Temporary event listeners scoped to one player or command, with a timer, a hit count, and lifecycle callbacks. They stop themselves.
  5. Async: Run a lambda off the main thread with futures, wait for an event or result without freezing the server, and watch a value or condition.

Links

github skLambda wiki

Get on skUnitySkriptHubViewTheDocs skDocks

Example: same task, two ways

The task: tell the player to mine 10 stone in 30 seconds. Give a diamond if they finish, say "too slow" if they don't.

Without skLambda

on break of stone:
    if {challenge::%player%} is not set:
        stop
    add 1 to {challenge::progress::%player%}
    if {challenge::progress::%player%} >= 10:
        send "you did it!" to player
        give 1 diamond to player
        delete {challenge::%player%}
        delete {challenge::progress::%player%}

command /challenge:
    trigger:
        set {challenge::%player%} to true
        set {challenge::progress::%player%} to 0
        send "mine 10 stone in 30s" to player
        wait 30 seconds
        if {challenge::%player%} is set:
            send "too slow" to player
            delete {challenge::%player%}
            delete {challenge::progress::%player%}

Lots to do by hand: a global on break of stone that runs for every player, a flag variable, a counter variable, a separate wait for the timeout, and delete lines everywhere to clean up.

With skLambda

command /challenge:
    trigger:
        send "mine 10 stone in 30s" to player
        listen for block break where event-block is stone:
            countdown: 30 seconds
            triggers: 10
            every 1 second:
                send action bar "%remaining triggers% left — %remaining countdown%" to event-player
            on completion:
                send "you did it!" to event-player
                give 1 diamond to event-player
            on timeout:
                send "too slow!" to event-player

That's it. The listener belongs to this one command run. The counter, the timer, and the live action-bar readout are built in, and when it finishes or times out, it cleans up by itself.

More than listeners

Save a test and run it over a list. Predicates pair with Skript's own filter, and list operations skip the loop:

# keep only the players who are AFK
set {_afk} to lambda (p: player): {_p}'s idle time > 5 minutes
set {_idle::*} to all players where [{_afk} passes for input]

# score every player with a lambda, grab the winner
set {_score} to lambda (p: player) -> number:
    return {_p}'s level
set {_mvp} to highest of all players by {_score}

New in 1.3.0, you can pause a trigger and wait without freezing the server:

command /confirm:
    trigger:
        send "type 'yes' in chat within 15s to confirm." to player
        wait for next chat where player is sender within 15 seconds:
            if message is "yes":
                send "confirmed!" to player
            on timeout:
                send "cancelled — no reply." to player

The trigger picks up right where it left off when the player chats, and the server keeps ticking the whole time. You can also wait for a background job (future of calling lambda ...) or watch a value or condition and react only when it changes.

Full guides and dozens of runnable examples are on the wiki.

Requirements

License

MIT

Stats

skLambda uses bStats for anonymous usage stats. You can opt out in plugins/bStats/config.yml.

bStats

NOTES

if you experience any problems, let me know on discord eult, discord server

Галерея

Последние версии

Все версии →
release

skLambda 1.6.0

1.6.0
17 сент. 2026 г.93Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3paper, purpur
Скачать
Что нового
# skLambda 1.6.0 **Supports:** Paper 1.21.1+ · Skript 2.15+ Want the full details? [wiki: New-Features](https://github.com/ahmadmsaleem/skLambda/wiki/New-Features) Adds a new commands module that controls which commands players see when they press /. - show only commands %strings% [where <condition>]: limits the list to the named commands. The condition is checked for each player whenever their list is sent, so permission groups work from on load. Rules add up, and a player who matches none of them sees no commands. - hide commands where %object% passes: hides every command a lambda passes for. The lambda gets the command label, then the player. - hide commands %strings% from %players% / show commands %strings% to %players%: per-player hides that last until the matching show runs. - reset command visibility [for %players%]: clears every rule and hide, or only the hides of the given players. Example ```applescript on load: show only commands "help", "msg" and "tpa" where player has permission "group.default" show only commands "ban", "kick" and "mute" where player has permission "group.mod" set {_namespaced} to lambda (cmd: text): {_cmd} contains ":" hide commands where {_namespaced} passes on damage of player: hide commands "spawn" and "home" from victim wait 10 seconds show commands "spawn" and "home" to victim command /resetcommands: trigger: reset command visibility ``` Players' command lists update right away, with no rejoin needed. Rules and hides are removed when the script that made them is reloaded. Hiding only changes what players see, so typed commands still run. Turn the module off with ``commands: false in config.yml.``
release

skLambda 1.5.0

1.5.0
25 авг. 2026 г.35Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2paper, purpur
Скачать
Что нового
# skLambda 1.5.0 **Supports:** Paper 1.21.1+ · Skript 2.15+ Want the full details? [wiki: New-Features](https://github.com/ahmadmsaleem/skLambda/wiki/New-Features) Bug fixes and playing nicer with other addons. Most of it came from running skLambda next to Skript core, SkBee, skript-reflect and skript-gui and finding the places where they quietly fought over the same wording. ## New effects - **Format a GUI slot with a lambda:** `format gui slot[s] %objects% of %gui% with %itemtype% [handled by %lambda%]` puts an item in a skript-gui slot and hands the click to a lambda, so a shared "close" or "back" button is written once and reused instead of getting its own inline section in every menu. The handler gets the player, the slot index and the clicked item, and a shorter lambda just ignores what it does not declare. Add `stealable` (or `removable`) before the item to let players take it. `unformat gui slot[s] %objects% of %gui%` clears them again. - **Fill a GUI from a list:** `fill gui %gui% from %objects% rendered with %lambda% [handled by %lambda%] [starting at slot %number%]` is a data-driven menu in one line. The renderer turns each element into an item, the handler gets the element, the player and the slot. Each slot closes over its own element, so one handler covers the whole menu. Pair it with `page %number% of %objects% by %number%` and a long list pages itself. - Both only register when skript-gui is installed, and skLambda does not build against it, so nothing changes if you do not use it. skript-gui is now a soft dependency, so it always loads first. Before that, plugin load order decided whether the effects existed at all. ## New listener options - **Inventory owners:** `owner:` now takes an inventory as well as an offline player, entity, chunk or world. The listener or watcher stops itself when the last viewer closes that menu, which is what you want for a watcher driving a live GUI. Before, a `watch (balance of player) every 1 second` feeding an open menu kept polling after the player closed it. Two inventories count as the same owner only when they are the same object, so two empty chests of the same size do not get mixed up. ## New conditions - **Unambiguous future state:** `future [of] %future% is (done|completed|resolved)`, `is pending` and `has failed`, each with a negated form. SkBee defines `%advancementprogress% is done` and claims that wording first, so a plain `if {_f} is done:` was silently becoming an advancement check. Write `if future {_f} is done:` and it always reaches skLambda. `is resolved` and `is completed` were never in conflict and stay the shortest safe way to ask. ## New expressions - **Every value a lambda returned:** `results of calling lambda %object% [with %objects%]` is the plural spelling of `result of calling lambda` and hands back the whole list when the body returned one. The singular still gives the first value, so nothing you wrote changes. ## Improvements - **skript-reflect sections and function references work as lambdas:** anywhere skLambda takes a lambda, it now also takes a section stored with `create new section stored in {_s}` and a function reference from `the function "name"`. So `{_list::*} mapped with {_section}`, `sorted by {_section}`, `pipe 5 through {_section}`, `{_list::*} where [{_section} passes for input]` and `future of calling lambda {_section}` all run code you already wrote. A section takes its arguments through `with arguments variables`, and its `return` is what comes back. A function reference written with arguments, like `the function "add" called with 100`, keeps them bound as the leading ones, exactly like `with ... bound`. skLambda does not build against skript-reflect, so none of this loads when it is absent. - **Lambdas are Java functional interfaces:** a lambda is now a `Consumer`, `BiConsumer`, `Function`, `Predicate`, `Supplier`, `Runnable` and `Comparator`, so you can hand one straight to any Java method that wants one. Through skript-reflect that means `{_stack}.editMeta({_lambda})`, `{_list}.removeIf({_lambda})`, `{_list}.sort({_lambda})` and `{_optional}.map({_lambda})` work directly, without an adapter call or a reflect section. Whatever calls it decides which shape applies, so the same lambda can be a consumer in one place and a predicate in the next. `asPredicate()`, `asFunction()`, `asBiFunction()`, `asConsumer()` and `asSupplier()` are real methods on the lambda now too, the way the wiki always described them. - **`call` and `invoke` work as statements:** `call lambda {_x}` and `invoke lambda {_x}` parse on their own line, not just as expressions. `run lambda {_x}` is unchanged. - **Lambdas can return a list:** `return {_list::*}` used to fail with a confusing error borrowed from another addon and then hand back nothing. It works now, readable through `results of calling lambda`. `function lambda "name"` keeps a function's whole result too, instead of dropping everything after the first value. - **Type names read properly:** Skript's warnings said "a types.lambda cannot be saved" because skLambda shipped a language file with its type names commented out. It says "a lambda" now. Same for listeners, futures and end reasons. ## Bug fixes - **`mapped with [...]` no longer crashes:** `set {_widths::*} to ({_headers::*} mapped with [length of "%input%"])` threw `UnparsedLiterals must be converted before use` at runtime, because skLambda's `%objects% mapped with %object%` claimed the line ahead of Skript core's bracket version and then choked on the bracket. Every lambda slot now declines raw unparsed text, so core's `mapped with`, `transformed using`, `reduced with` and `where` bracket forms all reach Skript. Fixed in all fourteen places a lambda is taken. - **`result of calling lambda` gave nothing:** skLambda's own `result[s] of %futures%` outranked it, and since a future slot accepts any object through a converter, it swallowed the whole line. Both sides now check what they are actually handed. - **Parameter defaults broke on brackets, commas and quotes:** `lambda (a: number = (1 + 2))`, `lambda (a: number = max(1, 9))`, `lambda (a: string = "x, y")` and `lambda (a: string = "a)b")` all failed, with the error claiming "Lambda definitions need a body" when the body was right there. The signature parser now scans brackets and quoted text properly. - **`sorted by` left lists untouched:** one element whose key lambda returned nothing was enough to leave the entire list unsorted, and a text key never ordered anything at all. Nothing-keys now sink to the end in their original order, keys of different kinds group by kind, anything comparable sorts properly, and equal keys keep their original order. - **A skipped argument leaked the surrounding variable:** calling a lambda without an argument for a parameter that shares a name with a captured local showed the capture instead of nothing, the opposite of the documented rule that parameters shadow captures. A call missing a required argument is refused outright now, so an arity mismatch like `(1, 2) mapped with %2-arg lambda%` gives you nothing instead of a plausible-looking wrong number. - **A fold step returning nothing corrupted the rest:** in `reduced with` and `scanned with`, a lambda that returned nothing handed the next step an empty accumulator, so the running total reset partway through. Such a step is skipped now and the fold carries on. - **`contains` never found a listener:** `if all active listeners contains {_l}:` was always false, and so was comparing two listeners with `is`, because Skript had no comparator for the type. Listeners, futures and lambdas now compare by identity, so `contains`, `is` and `is not` work on all three. - **`new value` and `old value` were claimed in every script:** those words, plus `current value`, `previous value`, `former value` and `changed value`, were taken by skLambda anywhere on the server and quietly read as nothing outside a watcher, while `end reason` had guarded itself properly all along. They error at parse time now, telling you where they belong. **This one can break a script that already loads:** if you used any of those exact words for something else, the line is rejected instead of silently giving you nothing. Rename it, or read the value you meant directly. - **`script of %listener%` disagreed with `script`:** it returned a bare file name while Skript's `script` includes the folder, so comparing the two never matched. It now spells the script the same way Skript does. **Full Changelog**: https://github.com/ahmadmsaleem/skLambda/compare/1.4.0...1.5.0
release

skLambda 1.4.0

1.4.0
2 авг. 2026 г.43Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2paper, purpur
Скачать
Что нового
# skLambda 1.4.0 **Supports:** Paper 1.21.1+ · Skript 2.15+ ## New effect - **Fail a future** `fail %futures% [with %text%]`: settles a future as broken and wakes every waiting trigger into its `on failure:` block. `reject %futures%` is the same thing. Reason defaults to "future failed". First outcome wins, so a late `fail` does nothing. ## New expressions - **Failure reason** `failure reason of %future%`: why a future broke. Nothing for one that's pending or resolved fine, so it doubles as a failure test. If a background lambda errored, you get a short note pointing at the console where Skript logged the real exception. `error of`, `failure of`, `exception of` all work. - **Already-finished futures** `a completed future [with %object%]`, `a failed future [with %text%]`, `a resolved future`: what makes a "sometimes cached, sometimes async" helper tidy. The caller always gets a future and can always `wait for` it, whether or not any work happened. - **Chain a future** `%future% then %lambda%`: a new future resolving with the lambda applied to the original's result. Source is untouched and still awaitable. Source fails -> chain fails with the same reason and the lambda never runs. Lambda errors -> chain fails with that. Chain as far as you like. `chained with` is the same thing; deliberately not `mapped with`, that belongs to list mapping. - **Take and drop while** `%list% taken while %predicate% passes` / `dropped while`: the leading run that passes, and everything from the first failure onward. Both care about position, which is why `where` can't do their job. They always split the list cleanly. - **Where a listener came from** `script of %listener%`, `creation date of`, `age of`: loop `all active listeners` to find stale ones and unregister them from a script instead of squinting at a console list. `age of` counts from creation, not registration. ## New listener option - **Fire on the first poll** `initial: %boolean%` on `watch when`: the state to assume before the first poll. Normally the first poll only sets a baseline, and that's the usual reason a watcher "doesn't work" — the thing was already true when you started watching. `initial: false` fires `on rising:` straight away; `initial: true` is the mirror for `on falling:`. Leave it off and nothing changes. ## New section block - **Handle a failed wait** `on failure:`: nests inside `wait for`, next to the body and any `on timeout:`. `wait for all of` fires it on the first failure and gives up. `wait for any of` fires it only once every future has failed, so one success takes the main body. Leave it off and failures fall through to the body like before. ## Improvements - **A background lambda that errors now fails its future.** It used to resolve quietly to nothing, identical to a lambda that returned nothing. Now `has failed` is true, `failure reason of` explains it, and `wait for` routes to `on failure:`. The one intentional behaviour change in the release. - **`wait for any of` waits for a success.** It used to settle on the first future to finish either way, so an early failure could end the wait while another was about to succeed. - **A misindented `on timeout:` or `on failure:` tells you so**, instead of Skript's generic "can't understand this section". - **Documentation fixes.** Several shipped examples didn't parse: `size of` where Skript wants `amount of`, a `sha256 of` that was never Skript syntax (it's `%text% hashed with SHA-256`), a `balance of` that quietly needed Vault, and a `wait for` whose `on timeout:` was dedented. References to `filtered where` and `count of ... where`, both removed in 1.1.1, are gone too. ## New commands - **`/sklambda futures`**: every unresolved future, with where it was created, how long it's been waiting, and how many `wait for` blocks are suspended on it. Blocks waiting with no way to resolve = a stuck trigger. Only lists futures something still holds; one nothing references is ordinary garbage, not a leak. - **`/sklambda reload`**: re-reads `config.yml`. `notifier` and `update-notifications` apply right away. `lambda` and `listener` still need a restart, because syntax goes to Skript once at startup and can't be taken back. Every option is now tagged `[RELOAD]` or `[RESTART]`. ## Leak detector - **It watches futures too.** New `futures` section with its own `warn-after` and message, using `{location}`, `{duration}`, `{awaiting}`. A future that never resolves leaves every `wait for` on it suspended forever — as quiet a leak as a listener you never stop. `enabled: true` switches the notifier on, then `listeners:` and `futures.enabled:` pick which scans run. Still off by default.
release

skLambda 1.3.0

1.3.0
15 июн. 2026 г.67Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2paper, purpur
Скачать
Что нового
# skLambda 1.3.0 **Supports:** Paper 1.21.1+ · Skript 2.15+ This release is about async. A lambda can run off the main thread, a trigger can wait for something without freezing the server, and a new watcher polls values and conditions for you so you don't have to write a loop. ## New sections - **Wait for a future:** `wait for %future% [within %timespan%]:` suspends the trigger until the future resolves, then runs the body, where `result of %future%` is ready to read. The server keeps ticking while it waits, it doesn't block. Use `wait for all of %futures%` to join several (when-all) or `wait for any of %futures%` for the first to finish. An optional `on timeout:` block runs instead if the time runs out, and locals from either branch carry on to the code after the block. - **Wait for the next event:** `wait for next <event> [where <condition>] [within %timespan%]:` pauses a trigger until that event fires, with the event's values in scope in the body (so `message` works for `chat`). Filter with a trailing `where`, cap the wait with `within`, and handle the no-show with `on timeout:`. The event has already dispatched by the time the body runs, so you can't cancel or change it there. - **Watch a value:** `watch %value% every %timespan%:` re-reads the expression on a timer and runs `on change:` only when it differs from last time, with `old value` and `new value` in scope. Pass `within %timespan%` for an `on timeout:`, add `on end:` for teardown, and tie it to an `owner:` so it stops itself when the owner goes away. It's a normal listener, so `pause`, `resume`, `unregister` and `/sklambda listeners` all work on it. - **Watch a condition:** `watch when <condition> every %timespan%:` is edge-triggered. `on rising:` fires the moment the condition goes false to true, `on falling:` fires on true to false. The state at the first poll is the baseline, so a condition that's already true won't fire `on rising` until it goes false and back. This is "do X the first time Y becomes true" without a poll loop. ## New expressions - **Future of a lambda:** `future of calling lambda %lambda% [with %objects%]` starts the lambda on a background thread right away and hands you a future for its result. The body must be pure computation or I/O with no Bukkit API (no blocks, entities, inventories, or players), since touching the server off-thread will throw. Arguments are read on the main thread before it starts. - **New future:** `a new future` is an empty promise you resolve yourself later with `complete`. Good for bridging a callback or another thread back into a waiting trigger. - **Future result:** `result of %future%` is the resolved value, or nothing for a future that isn't done yet or that failed. Read it after a `wait for`, when the future is guaranteed resolved. - **Old and new value:** `old value` and `new value` hold the previous and current readings inside a watcher's `on change:` block. ## New condition - **Future state:** `%future% is done` (also `resolved` or `completed`), `%future% is pending`, and `%future% has failed`, each with a negated form. Check a future before reading its result, or branch on whether a background job blew up. ## New effect - **Complete a future:** `complete %future% with %object%` resolves one or more futures with a value and wakes any trigger waiting on them. `complete %future%` with no value resolves it with nothing. A future that's already resolved is left alone.
release

skLambda 1.2.0

1.2.0
7 июн. 2026 г.38Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2paper, purpur
Скачать
Что нового
I've decided to keep working on skLambda, so I'm maintaining the project again. Here's 1.2.0. # skLambda 1.2.0 **Supports:** Paper 1.21.1+ · Skript 2.15+ ## New expressions - **Scanned:** `%objects% scanned with %lambda%` is like `reduced`, but it keeps every running result instead of only the last one. Give it `3, 5, 2` and an adding lambda and you get `3, 8, 10`. Add `from %value%` to start from a seed, which comes out first, so `3, 5, 2` from 100 gives `100, 103, 108, 110`. Handy for running balances and cumulative totals. - **Zipped:** `%objects% zipped with %objects% using %lambda%` walks two lists side by side and combines each pair with a two-argument lambda. `(1, 2, 3)` zipped with `(10, 20, 30)` and an adding lambda gives `11, 22, 33`. It stops at the shorter list. - **Piped:** `pipe %object% through %lambdas%` runs a value through a chain of one-argument lambdas, left to right, feeding each result into the next one. `pipe 5 through {_inc}, {_double}` is the same as calling double on the result of inc. Anything in the list that isn't a lambda is skipped. - **Page / Window:** `page N of %objects% by S` cuts a list into chunks of S and hands you the Nth one (1-based). The last page can be shorter, and a page past the end is empty. `window N of %objects% by S` slides one element at a time instead, so window 1 is items 1 to S and window 2 is items 2 to S+1. Good for paging a list into a GUI. - **Page count / Window count:** `page count of %objects% by S` is how many pages the list splits into, rounded up so a partial last page still counts. `window count of %objects% by S` is `length - S + 1`. Loop over the count to fill a menu. - **Listener cooldown:** `cooldown of %listener%` (or `%listener%'s cooldown`) reads the `cooldown:` you set on a listener, and you can change it from outside with set, add, and remove. Set it to zero to turn the cooldown off. - **Listener owner:** `owner of %listener%` (or `%listener%'s owner`) gives back the owner you tied a listener to with `owner:`, or nothing if it has none. ## New conditions - **Counting quantifiers:** `at least N of`, `at most N of`, and `exactly N of %objects% passes` check how many predicates in a list pass, not just all of them or none. `if at least 2 of {requirements::*} passes for {_p}:` is true when two or more hold. They sit right next to the existing `all of` / `any of` / `none of` forms. ## New effect - **Pause / resume by owner:** `pause all listeners owned by %object%` freezes every listener tied to that owner in one line, and `resume all listeners owned by %object%` brings them back. Same idea as `unregister all listeners owned by`, except it only pauses instead of stopping them for good. ## Improvements - **Default parameters:** a lambda parameter can carry a default, `lambda (n: number = 1) -> number:`. When the caller leaves that argument off, the default fills in. Only trailing arguments can be skipped, so `call {_f} with 10` on a two-parameter lambda uses the default for the second one. - **Options work inside listen entries:** script `options:` like `{@grace}` now expand inside a `listen` section, so you can write `countdown: {@grace}` or `cooldown: {@debounce}` and reuse one value across listeners. They used to be left as raw text and fail to parse.
release

skLambda 1.1.1

1.1.1
3 июн. 2026 г.20Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2paper, purpur
Скачать
Что нового
> **This addon is no longer maintained.** As of 1.1.1, skLambda will not receive further updates. The source stays available, but there are no planned releases, fixes, or support going forward. Feel free to fork it. --- ## skLambda 1.1.1 **Supports:** Paper 1.21.1+ · Skript 2.15+ ### Removed - **Duplicate list expressions**: `%objects% filtered where %objects% passes`, `count of %objects% where %objects% passes`, and `first of %objects% where %objects% passes` have been removed. Skript core already ships its own `filtered`, count, and first list operations, so these were redundant and only added overlap. The lambda forms (`filtered`, `count of … where`, and the `%lambda%`-based expressions) still work as before. ### Improvements - **Listener internals cleaned up**: listener tracking, owner cleanup, and the active-listener registry were pulled out of one large class into focused pieces. No behavior change, just easier to maintain.
release

skLambda 1.1.0

1.1.0
3 июн. 2026 г.13Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2paper, purpur
Скачать
Что нового
# skLambda 1.1.0 **Supports:** Paper 1.21.1+ · Skript 2.15+ ## New expressions - **Highest / Lowest By**: `highest of %objects% by %lambda%` and `lowest of %objects% by %lambda%` give you back the one item with the biggest or smallest value. You write a small lambda that scores each item, and it hands you the winning item itself. Ties keep the first one; an empty list gives nothing. You can also say `min` or `max`. - **Bound**: `%lambda% with %objects% bound` fills in the first argument(s) ahead of time. An "add two numbers" lambda can become "add 5 to whatever you give me." Fill in every argument and you get a lambda that takes nothing and just returns the answer. - **Negated**: `negated %lambda%` (or `negation of %lambda%`) flips a yes/no check so it passes when the original would fail. Handy with `filtered where` and `count of … where`. - **Active Listeners**: `all active listeners` gives you every listener running right now (the same ones `/sklambda listeners` shows). `listeners owned by %object%` gives you just the ones tied to one owner. You can loop over them and shut them down. ## New listener options - **on register:**: runs once, right when the listener starts up. It's the partner to `on end:`, so you can set things up and clean them up in one place. ## Improvements - **One-line lambdas can return a value**: before, a one-line lambda could only check something or do something. Now it can also give back a value, `lambda (a, b): return {_a} + {_b}`, or even shorter, `lambda (n): {_n} * 2`. - **Lambdas remember nearby variables**: a lambda keeps a copy of the local variables (`{_x}`) from where you wrote it, so it can still read them when it runs later. It's a snapshot from that moment, changing those variables afterward won't affect it, and changes inside won't leak out. If a parameter shares a name with one of them, the parameter wins. - **Reduce with a starting value**: `%objects% reduced with %lambda% from %object%` lets you set what the total starts at. An empty list just gives back the starting value, and the start can be a different type than the items (like joining a list of items into one piece of text). - **More owner types**: `owner:` used to really only work for players. Now an **entity, chunk, or world** can own a listener too. It cleans itself up automatically when the owner goes away, a player logging off, an entity dying or despawning, or a chunk/world unloading. (Teleporting between worlds no longer wrongly kills a player's listeners.) - **Use lambdas from Java**: developers can turn a Skript lambda straight into a normal Java function with `asPredicate()`, `asFunction()`, `asBiFunction()`, `asConsumer()`, and `asSupplier()`.
release

skLambda 1.0.0

1.0.0
31 мая 2026 г.20Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2paper, purpur
Скачать
Что нового
# skLambda 1.0.0 **Supports:** Paper 1.21.1+ · Skript 2.15+ ## New expressions List loops can now be written as one-line operations instead of Skript `loop` blocks. Each one runs a lambda or predicate over a list. * **Mapped**: `%objects% mapped with %lambda%` turns every element into something new. * **Filtered**: `%objects% filtered where %predicate% passes` keeps only the elements that pass. * **Reduced**: `%objects% reduced with %lambda%` folds the whole list down to a single value. * **Sorted**: `%objects% sorted by %lambda%` sorts the list using a key pulled from each element. * **Count Where**: `count of %objects% where %predicate% passes` counts how many elements pass. * **First Where**: `first element of %objects% where %predicate% passes` returns the first element that passes. * **End Reason**: `end reason` reports why a listener stopped, so you can branch on it. Comes with its own type. ## New functions * **Constant predicates**: `always()` and `never()` are drop-in predicates. `always()` always passes and `never()` never passes. ## New listener options These go inside a `listen` section. * **`owner:`**: ties a listener to an owner (for example a player). When the owner disconnects, the listener unregisters itself. * **`on end:`**: a callback that always runs no matter how the listener stops (completion, timeout, cancel, unregister, or owner disconnect). One single cleanup path. * **`cooldown: %timespan%`**: debounces rapid re-triggers. A debounced event does not run `on trigger` and does not count toward `triggers:`. * **`every %timespan%:`**: a repeating timer callback that runs while the listener is active. It pauses and stops along with the listener. ## New effect * **Unregister owned listeners**: `unregister all listeners owned by %object%` stops only the listeners tied to that owner, for scoped cleanup. ## Update checker * **Startup check**: `update-notifications` now actually works (it used to be a reserved toggle that did nothing). On startup the plugin checks for newer releases and notifies op players when they join. ## Improvements * **`/sklambda` command**: now has tab-completion, and `/sklambda listeners` shows owner info for each listener. The plugin link now points to Modrinth instead of GitHub. * **Internal refactor**: element registration was split into `LambdaModule` and `ListenerModule`, trimming the main `SkLambda` class by about 90 lines. * **Examples**: `example.sk` gained 5 new showcases (`10` to `14`) covering the features above. * **Build**: version bumped to `1.0.0`. **Full Changelog:** [git... 1.0.0](https://github.com/ahmadmsaleem/skLambda/commit/24442d356c7a1064c2747ac9253aa16e0ddb9402)
alpha

skLambda 0.0.3-alpha

0.0.3-alpha
29 мая 2026 г.21Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2paper, purpur
Скачать
Что нового
# skLambda 0.0.3-alpha **Supports:** Paper 1.21.1+ · Skript 2.15+ ## New expressions - **Inline Lambda**: write a lambda on one line: `lambda (p: player): {_p} is op`. The body is either a condition (a predicate that returns `true`/`false`) or an effect (runs and returns nothing). Parameters become locals like `{_p}`. - **Function Lambda**: `function lambda "name"` wraps an existing Skript `function` in a lambda you can store, pass around, and call like any other lambda. - **Call Lambda (new forms)**: alongside `call`/`invoke lambda`, you can now write `calling lambda %lambda% [with ...]` and `the result of calling lambda %lambda% [with ...]`. ## New condition - **Predicate Passes**: treat a lambda as a yes/no test: `%lambdas% pass[es] [for %values%]` (also reads as `matches`/`holds`). With a list of lambdas, a quantifier decides how many must pass: `all of` (the default), `any of`, or `none of`. Negate with `doesn't pass` or a leading `not`. Works inside `listen ... where`, too. ## New effects - **Unregister All Listeners** : `unregister all listeners` stops every active listener on the server (across all scripts). - **Unregister Last Listener**: `unregister the last created listener` stops the most recently created one still active. Neither fires `on completion` or `on timeout`. ## New command - **/sklambda**: shows the version and GitHub link. `/sklambda listeners` lists every active listener (where it was created, the event it watches, and how long it has been alive). Alias `/skl`. Guarded by the `sklambda.admin` permission (default: op). ## Configuration - **config.yml** added. Toggle features with `lambda` and `listener`: a disabled feature registers no syntax at all (both default to `true`). - **Listener leak detector** (`notifier`): optional console warnings about listeners that stay registered longer than `warn-after`, repeated every `warn-every`, with a customizable `message` (placeholders `{location}`, `{event}`, `{duration}`). Off by default. - `update-notifications` toggle reserved for a future update check. ## Improvements - **Type hints**: lambda and saved-listener variables now register a Skript type hint, so misuse is caught at parse time when a script opts into Skript's experimental `using type hints`. - Listener effects and conditions (`register`, `unregister`, `pause`, `resume`, and the registered/paused/running checks) now take a `%listener%` instead of `%object%`, for clearer errors. - `remaining triggers` and `remaining countdown` share a common base and now report `0` correctly once a listener has finished. - Website link now points to GitHub. **Full Changelog**: https://github.com/ahmadmsaleem/skLambda/compare/pre-release...0.0.3-alpha
alpha

skLambda 0.0.2-alpha

0.0.2-alpha
28 мая 2026 г.16Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2paper, purpur
Скачать
Что нового
# skLambda 0.0.2-alpha **Supports:** Paper 1.21.1+ · Skript 2.15+ ## New expressions - **Remaining Triggers** — `remaining triggers` (inside `on trigger`) or `triggers of %listener%`. Supports `add`, `set`, `remove`. - **Remaining Countdown** — `remaining countdown` (inside `on trigger`) or `countdown of %listener%`. Adjusting it reschedules the pending `on timeout`. ## New condition - **Listener State** — check whether a listener is `registered`, `paused`, or `resumed` (running). ## New effects - **Pause / Resume Listener** — pause a listener to ignore events and freeze its countdown; resume to continue. - **Skip Trigger** — inside `on trigger`, skip the current event without consuming a `triggers:` slot or running the rest of the body.