Skip to content

@Olyno Olyno released this Sep 9, 2021

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 causing IndexBoundException when inserting at line 1 of a size 0 (thanks @EarthAgar)
Contributors
EarthAgar
Assets 3

@Olyno Olyno released this Mar 18, 2021

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 to move %paths% to %path% (overwriting|replacing) existing one[s] due to confusing syntax.
  • Effect rename %paths% to %path% with replace has been changed to rename %paths% to %path% (overwriting|replacing) existing one[s] due to confusing syntax.
  • Event (file|dir[ector(ies|y)]|path) execute[d] has been changed to file (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 to file 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 effect fetch 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
Assets 3

@Olyno Olyno released this Dec 7, 2020

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"
Assets 3

@Olyno Olyno released this Nov 16, 2020

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
Assets 3

@Olyno Olyno released this Jul 20, 2020

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.g on file created instead of on 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.

Assets 3