▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
skLambda

skLambda

Skript addon that adds lambda functions and listeners to Skript.

Оцените первым
81
3
Все версииskLambda 1.2.0

skLambda 1.2.0

Release07.06.2026

Список изменений

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.

Файлы

skLambda-1.2.0.jar(174.79 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.2.0

Загрузчики

Paper
Purpur

Версии игры

1.21–26.1.2

Загрузок

23

Дата публикации

07.06.2026

Загрузил

ID версии

Главная