Releases: Olyno/skent
Fix Watch Event NullPointerException
What is new?
The "Watch File/Directory" event seems to generate a NullPointerException sometimes. This release should fix the error.
Fix
- NullPointerException in the "Watch File/Directory" event (thanks you LeCraft on Discord)
Hotfix for variables
What is new?
The variables do not seem to work in async. This release is a hotfix to solve this problem. No additions or deletions.
Fix
- Variables not working: #37 (thanks you @Bonnie20402)
The new Async system
What is new?
BREAKING CHANGES
The old async system wasn't good. Using a tabulation each time we want to synchronize a code was fun, but was clearly not usable. This part has been removed, so you can't use anymore sections for effects related to Skent. With the new system, we are using a prefix, sync
or async
. You can also define your preference in the plugins/Skent/config.yml
file if you want not to use the async system by default.
Example of the new system:
command test:
trigger:
set {_download_link} to "https://github.com/Olyno/skent/archive/refs/tags/3.1.0.zip"
sync download file from {_download_link} to file path "plugins/abc.zip"
sync unzip all files from file path "plugins/abc.zip" to dir path "plugins/abc"
delete file path "plugins/abc.zip" # This line is executed in async by default, i can omit the "async" prefix.
New library
ch.eitchnet:cron
andcom.coreoz:wisp
: Used for the new cron event
New event
cron %string% start
Enhancements
- Support of Skript 2.6.2+, this also mean drop of Minecraft 1.12 support.
- Added a new Metrics related to the new async system: check who is using by default.
Other problems remain persistent and require more time. If you discover an issue with this version, create a new issue.
The improvement of processes
The improvement of processes
What is new?
New library
dotenv-java
: Used for the new execute effect (see below)
New event
file fetch[ed]
New expression
(output|log)[s] of %processes%
or%processes%' (output|log)[s]
last [started] process
Enhancements
- Added
[with arg[ument][s] %-strings% [and]] [with env[ironment file[s]] %-paths% [and]] [(1¦with (logs|output))]
to the execute effect. It able to execute a file with some arguments, or/and some environment variables from a file, or/and showing logs. - Includes a better integration with SkriptMigrate using its API
Fix
- Fix execute file effect which didn't work correctly
- Fix docs of
ExprProcessWithPid
- Fix
ExprLine
causingIndexBoundException
when inserting at line 1 of a size 0 (thanks @EarthAgar)
The ascension of the processes
The ascension of the processes
Note
The new type is process
. Due to a Skript bug, you will see processes
or processe
in syntaxes, but you need to use it as process
only.
Introduce migration file
Using a new tool I created named SkriptMigrate, you can migrate from your old scripts using Skent to new syntaxes. You just need to download it here and when your server started, run migrate
.
If you get any issue with the tool, please create an issue on SkriptMigrate's repository.
Breaking changes
- Effect
(execute|run) %paths%
has been changed to(execute|run|start) %paths%
. - Effect
move %paths% to %path% with replace
has been changed tomove %paths% to %path% (overwriting|replacing) existing one[s]
due to confusing syntax. - Effect
rename %paths% to %path% with replace
has been changed torename %paths% to %path% (overwriting|replacing) existing one[s]
due to confusing syntax. - Event
(file|dir[ector(ies|y)]|path) execute[d]
has been changed tofile (execute[d]|start[ed]|running)
because you can't execute a directory obviously. - Event
(file|dir[ector(ies|y)]) download[(ing|ed)]
has been changed tofile download[(ing|ed)]
because you download a file or a zip which still a file. - Effect
content from url
is now deprecated and has been removed from Skent. The reason is simple: if you fetch an huge content, it will probably make crash your server because it's an expression, and all expressions in Skent are synchronous. Please use the new effectfetch
now (thanks @eDexiam).
All your current syntaxes can be fixed in one command using SkriptMigrate, look at it!
What is new?
Enhancements
- Line expression has now the
delete
changer availabe (thanks @GoldenMyst)
New event:
file execution (end[ed]|complete[d]|finish[ed])
New conditions:
%processes% (is|are) (alive|[still ]running)
%processes% (isn't|is not|aren't|are not) (alive|[still ]running)
New effects:
(kill|destroy|finish|stop) %processes%
force [to] (kill|destroy|finish|stop) %processes%
fetch url %string%
New expressions:
pid of %processes%
or%processes%' pid
process with pid %string%
fetched url content
New type:
processe
Fix
- Local variables are no longer deleted after an async effect! (thanks @TPGamesNL)
- Fix events documentations
Introducing watch events
Introducing watch events
What is new?
Added
New: Watch events are now here! Execute codes when a file change, is deleted or added!
on watching file changes at "plugins/Skript/scripts":
reload script file file name of event-path
broadcast "Hello Change"
on watching file creation at "plugins":
broadcast "Hello Creation"
on watching file deletion at "plugins/test.txt":
broadcast "Hello Deletion"
Fix Copy effect
Description
Here is a seems to work fix of the copy
effect. Indeed this update is really small, but a bigger is planned 👀
Patch note
Fix
- Copy effect
Welcome to Skent 2.0
Welcome to Skent 2.0
What is new?
Breaking changes
- Expression
[the] (file[s]|dir[ector(y|ies)]) %strings%
has been changed to[the] (file[s]|dir[ector(y|ies)]) path %strings%
due to a syntax conflict (Thanks @Sashie and @APickledWalrus). - Condition
%path% (is|are) [a[n]] exe[cutable]
has been changed to%path% (is|are) [a[n]] exe[cutable] (file|dir[ectory]|path)
to avoid any syntax conflict - Condition
%path% (is|are) hidden
has been changed to%path% (is|are) [a[n]] hidden (file|dir[ectory]|path)
to avoid any syntax conflict - Condition
%path% (is|are) readable
has been changed to%path% (is|are) [a[n]] readable (file|dir[ectory]|path)
to avoid any syntax conflict - Condition
%path% (is|are) writable
has been changed to%path% (is|are) [a[n]] writable (file|dir[ectory]|path)
to avoid any syntax conflict - All events must contain
(file|dir[ector(ies|y)]|path)
before them (e.gon file created
instead ofon created
) to avoid any syntax conflict - Size expression returns a number in bytes, no longer a string
Added
New: Events have now the path
word as choice, as (file|dir[ector(ies|y)]|path)
instead of (file|dir[ector(ies|y)])
New: You can use multiple paths when using an effect. For example:
command /create:
trigger:
set {_paths::*} to file path "plugins/abc/a.txt", "plugins/abc/b.txt" and "plugins/abc/c.txt"
create {_paths::*}
New: You can manage async effects by using them as scope effect. For example:
command /create:
trigger:
create file path "plugins/MyAwesomeFile.txt":
append "Hello World" to file path "plugins/MyAwesomeFile.txt":
broadcast "Content added! End of my task"
broadcast "Created my file"
broadcast "I can continue my code here without waiting the end of my task"
broadcast "I can continue my code here without waiting the end of my task"
New: New syntaxes
last modified (date|time) of %path%
%path%'s last modified (date|time)
last access (date|time) of %path%
%path%'s last access (date|time)
creat(ed|ion) (date|time) of %path%
%path%'s created (date|time)
usable space of %path%
%path%'s usable space
total space of %path%
%path%'s total space
unallocated space of %path%
%path%'s unallocated space
%path% (is|are) [a[n]] system (file|dir[ectory]|path)
%path% (isn't|is not|aren't|are not) [a[n]] system (file|dir[ectory]|path)
%path% (is|are) [a[n]] archive (file|dir[ectory]|path)
%path% (isn't|is not|aren't|are not) [a[n]] archive (file|dir[ectory]|path)
[on] [(file|dir[ector(ies|y)]|path)] change[d]
Fix
- Copy effect has been fixed
%path% is dir
and%path% is file
conditions have been fixed- Async bukkit events call have been fixed
- Not important errors have been removed
Why Skent moved from Bitbucket to Github?
Skent is a very fast growing addon, with many users using it. Personally, I'm more active on Github (really more active). Github will allow me to better manage problems and will allow me to answer you faster than on Bitbucket. Adding to this that most developers use Github will make it easier for them when they want to contribute (hi @FranKusmiruk).
You will find all the Skent builds available directly in the "Action" tab of Github.
Skent 2.0 marks the turning point of Skent, and all previous versions will no longer be supported, hence the removal of the project from Bitbucket.