Skent

Addon Skent 3.2.1

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

The variables do not seem to work in async. This release is a hotfix to solve this problem. No additions or deletions.
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:

Code:
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 and com.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

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)

Note: I didn't make the release of Skent 3.0.0 on Skunity, be sure to check the patch note directly on Github!
What is new?

Added

New: Watch events are now here! Execute codes when a file change, is deleted or added!

Code:
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"
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 mutliple paths when using an effect. For example:

Code:
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:

Code:
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

Code:
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 @Snow-Pyon).
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.
Description

I was thinking a long time ago how I could fix some of current issues, like condition "if file/dir exists" which didn't work well. So I found a way to fix that, and here is all changes I did in this version 1.9 of Skent

Patch note

Fixes:
  • Create file/dir effect didn't work correctly sometimes, it has been fixed.
Improvements/Changes:
  • Breaking change: Exists/Doesn't exist condition changed to make it works correctly without any conflict: %path% (is available|is(n't| not) (missing|non[(-| )]existent)) and %path% (is (missing|non[(-| )]existent)|is(n't| not) available)
  • Glob patterns have been added: glob (files|dir[ectorie]s) %string% (in|of|from) %path%
  • Added normalize expression: [the] normalize [path] of %path%
  • Like
Reactions: Seba
Description

A lot of people got issues with Skent recently, with some NullPointerException or syntaxes which don't work.

Here is a simple update to fix that.

Path note

Fixes

- BoundException with Insert Line Effect
- NullPointerException with Line and Content Expression

Thanks to people who reported me these issues. Don't hesitate to contact me if you have any issue with Skent.
Description

Hi everyone!
Was a big time I didn't update Skent (I mean, did an official update of it). So here is an update.

Patch Note

Fixes:

- Could not create directories, was a file instead of a directory.
- Could not get a line if this line didn't exist

Improvements/Changes:

- Added size expression:
- [the] size of %path%
- [the] %path%'s size

- Improve create file/dir effect by creating nonexisting dirs

Thanks to EthoCryantic for these reports. Don't hesitate to report me any issue/suggestion you have (using skript-chat discord (BbCWeKD) or issue system on the bitbucket of Skent)
Description

Hi everyone!
After a small update before, here is a real update! Indeed, it includes many changes, including more flexible syntaxes and some adjustments.
So here is version 1.6 of Skent!

Patch note

Fixes:

- Fix package name conflict.
- Fix local variables issues in effects (thanks @Blueyescat for the fix and @HYPExMon5ter for the report!)

Improvements/Changes:

- /!\ Breaking change /!\: any path returns now the path, no longer the name of the targeted file/dir when the path is in a string, like variable name {%path%} or a simple string "%path%". This change should make more logic what's a path, and what a path returns.
- /!\ Breaking change /!\: the All files/directories syntax changed to include 4 different syntaxes. This change make shorter syntaxes, and should improve the flexibility of this expression :
- all [the] files and [all] [the] dir[ectorie]s (in|of|from) %path%
- all [the] files (in|of|from) %path%
- all [the] dir[ectorie]s (in|of|from) %path%
- all [the] sub[(-| )]files and [all] [the] sub[(-| )]dir[ectorie]s (in|of|from) %path%
- all [the] sub[(-| )]dir[ectorie]s (in|of|from) %path%
- all [the] sub[(-| )]files (in|of|from) %path%
- Watching event has been deleted. It will be rework later.
- parent expression has now path word optional, as [the] parent [path].
- owner expression has now file word optional, as [the] [file] owner. It should resolve the conflict with Region Members & Owners expression of Skript is needed.
- (file|dir) name expression has now rectory word optional as (file|dir[ectory]) name.
- [the] absolute path expression returns now a Path and no longer a String.
- toString method of ExprFileDirectory precise now if it's a directory or a file.
- Events are now improved.
This version will reduce the size of Skent only!
  • Like
Reactions: Govindas