Repository navigation
Highlights
- Skript's load errors, before you load. "There's no player in a function event", empty sections, code after
stoporreturn, and mistyped events likeon jion:(with a fix) are flagged as you type. Each check stays silent when it cannot be sure, and the heuristic ones can be switched off. - Argument completion. After
kill,teleport player toorgive player, completion offers what fits that slot: event values, your locals, matching expressions and listed values like damage causes or biomes. Only the word you are typing is replaced. loop-values. Insideloop all players:, typingloop-offersloop-player; hover says which loop it refers to.- Doc comments.
#lines above a function, command or custom syntax, with@param,@returnand@deprecated, show in hover, signature help and completion. - Whole-project checks. Unknown functions, wrong argument counts and duplicate functions or commands are reported in scripts you do not have open.
- Option values inline.
{@prefix}shows its value next to it.
Fixes
- Pressing Enter at the end of a finished line could replace it with a completion suggestion. A finished line no longer shows one.
telnow suggests Teleport first, andcancel evsuggests Cancel Event.- Option values with spaces were cut short in completion and hover.
Full changelog
Added
- Argument completion. Once a statement's start identifies its syntax,
completion offers what fits the slot being typed:kill ploffers the
event'splayerand other entity expressions,teleport player to sp
offers Spawn (a location) and no entity-only expressions, a game mode slot
offerssurvivaland friends. Expressions are matched on their documented
return type, with a small table of well-known supertypes (a player is an
entity, a command sender and an offline player), and the trigger's locals
are offered when you ask with Ctrl-Space after a space. Accepting one
replaces only the word under the cursor, never the statement, and a word
that already spells out a value (kill player) opens no popup, so Enter
still starts a new line. - Doc comments. The
#lines directly above a function, command,
ClassySK method or skript-reflect definition are its documentation, shown
when you hover the declaration or any call, in completion, and in argument
hints, where each parameter carries its own text. Both conventions other
Skript editors use are read, so a documented file moves between editors
unchanged:@param,@return,@deprecated,@sinceand@example, and
the#d,#dp,#dr,#dexand#ddepfamily. A blank line detaches a
comment, and a###block counts when it closes directly above. A
@paramnaming no parameter is hinted, and a call to a@deprecated
function is struck through with the reason (switched off with the other
deprecation warnings bydeprecatedSyntaxDiagnostics). - Option values inline. With inlay hints on,
{@prefix}is followed by
the value the script'soptions:block gives it,= "&6[Shop]", cut short
past 30 characters. - "There's no player in a function event." Skript's most common load
error is now a warning as you type, in Skript's own words:player,
event-player,event-entity,event-block,attackerandvictim
inside a function, or in an event whose documented values can never supply
them (every 5 seconds,on world load). It stays silent wherever Skript
might accept the line: commands,on load(whose command sender passes
for a player), events with no documented values, addon events, sections
that run their body in an event of their own, and slots whereplayer
could be read as an entity type.eventValueDiagnostics: falseturns it
off. - Empty sections. A line ending in
:with nothing under it gets
Skript's own "Empty configuration section!" warning, following Skript's
reader exactly: a comment-only body counts as empty, and a#-#line
opens no section. - Unreachable code. Statements after a
stopor areturnin the same
block are faded and warned about, as Skript does on load. A script that
suppresses Skript's unreachable code warnings is left alone. - Mistyped events.
on jion:is reported as a structure Skript cannot
understand, with a quick fix to change it toon join. Only near-misses
of a known event are reported, and only once every addon in your
plugins/folder has its syntax loaded, so an addon's event is never
mistaken for a typo.unknownEventDiagnostics: falseturns it off. - Syntax newer than your server, opt-in. With
newerSyntaxDiagnostics: trueand the Skript version known, from the
detectedSkript.jaror theskriptVersionsetting, a line whose syntax
arrived in a later Skript is warned about with the version it needs. Older
syntax that also fits the line keeps it quiet. Off by default because
syntax a later Skript rewrote (Play Effect in 2.14) still reads as new. loop-completes the loop's own values. Insideloop all players:,
typingloop-offersloop-player,loop-entity,loop-valueand
loop-iteration; a list variable addsloop-index,loop 10 times
offersloop-number. Nested loops are numbered exactly where Skript
demands it (loop-value-1,loop-value-2) and nowhere else. Hovering a
loop-…name says which loop it refers to and what type it is, or that it
matches several loops, which Skript rejects.- Every listed value in argument completion. A slot whose type lists its
values offers them, ranked by what you typed: damage causes, biomes,
potion effect types, enchantments (also for%enchantment type%slots,
as insharpness 5), villager professions, game rules, teleport causes
and some forty more. Item and entity types stay out: their names are
open-ended aliases. - Diagnostics for scripts you do not have open. When a save, an edit, a
new or deleted file or agit pullchanges what the project declares, the
closed scripts that call or redeclare it are rechecked for unknown
functions, wrong argument counts and duplicates, so the project
diagnostics panel shows a caller you just broke, and clears it once fixed.
Only scripts inside the workspace are reported. Measured at about 12 ms for
a full pass over 300 scripts, so it is on by default;
features.projectDiagnostics: falseturns it off. - Duplicates across scripts. Two global functions with the same name and
the same parameter types (an overload by type is fine), two commands with
the same name, or two skript-reflect definitions with the same pattern are
warned about in both places, each linking to the other. - TODO, FIXME, XXX and NOTE stand out in comments, the tag word alone,
with semantic tokens on.
Fixed
- A script could be indexed twice under two spellings of its path. When
the editor and the project scan wrote the same file differently (~as
%7E, orC:asc:), the new cross-file checks saw the file as its own
duplicate. Paths are now compared in one normalised form. - Pressing Enter at the end of a line could replace it. The completion
popup was still open with a suggestion selected, and that suggestion stood
in for the whole statement although only its last word matched:
kill playerbecameplayer from uuids,teleport player to spawn
becamespawn entity types. A syntax suggestion now has to fit every word
of the statement from its start, and none is offered once a string,
variable or number has been written, so a finished line shows no popup and
Enter starts a new line. - Suggestions rank the syntax you are typing first.
teloffers Teleport
before Display Teleport Duration, andcancel evoffers Cancel Event
beforeevent-player. - An option's value was cut short. Completion and hover showed
prefix: &6[Shop] of the yearas&6; they now show the whole value.
Compare: v0.3.0...v0.3.1