-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
skLambda makes a config.yml file in its plugin folder the first time it runs.
Which changes take effect when depends on the option, and every option in the file is tagged with one of these:
| Tag | Meaning |
|---|---|
[RELOAD] |
applied immediately by /sklambda reload: everything under notifier, and update-notifications
|
[RESTART] |
needs a full server restart: lambda and listener
|
The feature toggles need a restart because syntax is handed to Skript once at startup and can't be unregistered afterwards. /sklambda reload says so in its reply, so you won't be left wondering why a toggle didn't apply.
You can switch off a whole feature. A switched-off feature adds no syntax at all. Both default to true.
# [RESTART]
# Lambdas: the `lambda` type, inline lambdas, default parameters, call/run, `passes`
# (incl. at-least/at-most/exactly), `negated`, `bound`, `pipe`, the lambda list
# operations (map/reduce/scan/zip/sort/min/max, page/window, taken/dropped while),
# always()/never(), and the futures (future of calling, a new future, completed and
# failed futures, result of, complete, fail, failure reason of, then, the future
# conditions) and `wait for` blocks.
lambda: true
# [RESTART]
# Listeners: the `listen` section, register/unregister/pause/resume (incl. by owner),
# on register / on end, remaining triggers / remaining countdown, cooldown/owner access,
# active-listener queries, listener origin (script/creation date/age), state checks,
# and the `watch` / `watch when` watchers.
listener: true(Filtering, counting, and finding a list use Skript core's own where / number of / first element of with a predicate, so they're not part of this toggle. See List operations.)
If you turn both off, skLambda warns you in the console and does nothing.
update-notifications: trueWhen on, skLambda checks Modrinth on startup for a newer release. If one exists, it logs a note to the console and tells op players on join (with a clickable download link). Set it to false to switch the check off.
With the project maintained again, it's worth leaving on so you hear about new releases as they land.
A listener you never stop keeps running forever, and a future that never resolves leaves every wait for on it suspended forever. The notifier finds both. When it's on, skLambda warns in the console about anything that has outlived its threshold.
It's off by default to keep the console quiet.
notifier:
enabled: false
# How often to repeat a warning about something still alive. Shared by both scans.
warn-every: 1 minute
# --- listeners ---
listeners: true
# How long a listener may live before it gets reported.
warn-after: 5 minutes
# Placeholders: {location} = script and line where it was made,
# {event} = the event it listens for,
# {duration} = how long it has been alive
message: "[skLambda] Listener created in {location} ({event}) has been alive for {duration}."
# --- futures ---
futures:
enabled: true
# How long a future may stay pending before it gets reported.
warn-after: 5 minutes
# Placeholders: {location} = script and line where it was made,
# {duration} = how long it has been pending,
# {awaiting} = how many `wait for` blocks are suspended on it
message: "[skLambda] Future created in {location} has been pending for {duration} ({awaiting} awaiting)."Set enabled: true to switch the whole thing on, then use listeners: and futures.enabled: to pick which scans run. All the timespans accept things like 30 seconds, 5 minutes, or 2 hours.
The future scan was added in 1.4.0. It only reports futures something still holds on to; one that nothing references anymore is ordinary garbage, not a leak, and is skipped.
skLambda adds one command for admins.
/sklambda # show the version and a link
/sklambda listeners # list every listener that is running right now
/sklambda futures # list every future that hasn't resolved yet
/sklambda reload # re-read config.yml
/sklambda listeners shows, for each active listener, where it was made (script and line), the event it listens for, and how long it has been alive. That makes it easy to spot one that should have stopped.
/sklambda futures does the same for futures that are still pending: where each was created, how long it has been waiting, and how many wait for blocks are suspended on it. A future with awaiting blocks and no way to resolve is a stuck trigger. Added in 1.4.0.
/sklambda reload re-reads config.yml and applies everything tagged [RELOAD] above. Feature toggles are not re-applied; it tells you so when you run it. Added in 1.4.0.
There's also a short alias: /skl.
By default only operators can use these. /sklambda is guarded by the sklambda.admin permission and /sklambda reload additionally by sklambda.reload, so you can hand them to staff with a permissions plugin.
See Listeners for how to stop listeners you find this way.
Guides
Reference





