
skLambda
Skript addon that adds lambda functions and listeners to Skript.
Оцените первым
158
3
Список изменений
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 itson failure:block.reject %futures%is the same thing. Reason defaults to "future failed". First outcome wins, so a latefaildoes 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 ofall 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 alwayswait forit, 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 withis the same thing; deliberately notmapped 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 whywherecan't do their job. They always split the list cleanly. - Where a listener came from
script of %listener%,creation date of,age of: loopall active listenersto find stale ones and unregister them from a script instead of squinting at a console list.age ofcounts from creation, not registration.
New listener option
- Fire on the first poll
initial: %boolean%onwatch 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: falsefireson rising:straight away;initial: trueis the mirror foron falling:. Leave it off and nothing changes.
New section block
- Handle a failed wait
on failure:: nests insidewait for, next to the body and anyon timeout:.wait for all offires it on the first failure and gives up.wait for any offires 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 failedis true,failure reason ofexplains it, andwait forroutes toon failure:. The one intentional behaviour change in the release. wait for any ofwaits 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:oron failure:tells you so, instead of Skript's generic "can't understand this section". - Documentation fixes. Several shipped examples didn't parse:
size ofwhere Skript wantsamount of, asha256 ofthat was never Skript syntax (it's%text% hashed with SHA-256), abalance ofthat quietly needed Vault, and await forwhoseon timeout:was dedented. References tofiltered whereandcount 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 manywait forblocks 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-readsconfig.yml.notifierandupdate-notificationsapply right away.lambdaandlistenerstill 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
futuressection with its ownwarn-afterand message, using{location},{duration},{awaiting}. A future that never resolves leaves everywait foron it suspended forever — as quiet a leak as a listener you never stop.enabled: trueswitches the notifier on, thenlisteners:andfutures.enabled:pick which scans run. Still off by default.
Файлы
skLambda-1.4.0.jar(250.56 KiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
1.4.0
Загрузчики
PaperPurpur
Версии игры
1.21–26.2
Загрузок
28
Дата публикации
02.08.2026
