SkQuery [1.13-1.19+]

Addon SkQuery [1.13-1.19+] 4.1.10

  • 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!

Added:
- Added former movement location. Uses the getFrom() in the on any movement that never existed.
code_language.skript:
([the] (past|former) move[ment] [location]
- Added settable relative option to the time relative syntax.
code_language.skript:
(relative|player) time of %player% [with relative %-boolean%]

#or

%player%'s (relative|player) time [with relative %-boolean%]

Fixed:
- Fixed Time Relative throwing null when trying to reset http://skunity.com/search?search=time+rel#
- Fixed the where filter expression not working. (Throws some errors if the predicate contains an unknown expression/value. Looking into fixing that.)
- Fixed some minor bugs.

Example script:

code_language.skript:
function isInSwamp(p: player):
    loop all players where [distance between {location} and {_p} <= 10]:
        message "&2Get out of my Swamp!" to loop-player
command /where:
    trigger:
        loop all players where [player input is "LimeGlass" parsed as player]:
            message "&aOh hi there Lime" to loop-player
function flyingEntities(empty: boolean = false) :: entities:
    return all entities where [ground state of entity input is false]
function betterContains(objects: objects, contains: object) :: boolean:
    if {_objects::*} where [object input is {_object}] is empty:
        return false
    else:
        return true
command /test:
    trigger:
        set {_objects::*} to "Stuff", "Test", "Skript" and "Testing"
        if betterContains({_objects::*}, "Testing") is true:
            broadcast "yes"
        else:
            broadcast "no"
Fixed the fireworks system not working at all since Gatt's 1.9 SkQuery edit.

Added colour support to the firework syntax. For everyone not American xD

Fixed some minor bugs.

Modified Syntax:

code_language.skript:
#Main launch effect:
    (launch|deploy) %firework effects% at %locations% (with duration|timed) %number%

#%firework effect%:
    (1¦|2¦flickering |3¦trailing |4¦flickering trailing |5¦trailing flickering )%firework type% [firework] [effect] colo[u]red %colors%

    (1¦|2¦flickering |3¦trailing |4¦flickering trailing |5¦trailing flickering )%firework type% [firework] [effect] colo[u]red %colors% fad(e|ing) [to] %colors%

#%firework types%:
    ball, ball large, burst, creeper, star

Firework examples:
code_language.skript:
command /fireworks:
    trigger:      
        launch flickering ball firework colored red at player's location timed 0
        wait a second
        launch trailing ball large coloured red, blue and green at player's location timed 1
        wait a second
        launch flickering trailing creeper coloured green fading to red, black and green at player's location timed 1
        wait a second
        launch trailing flickering star coloured purple and red fading to pink at player's location timed 1
Changed:
code_language.skript:
make %livingentities% pathfind to %location% with speed %number%
#to
make %livingentities% pathfind to %location% (with|at) speed %number%

Added:
- Metrics https://bstats.org/plugin/bukkit/SkQuery

Fixed:

- Some minor bugs
Added the ability to stop a midi while it's playing.
code_language.skript:
stop midi [id] %string%

The ID will be the string input used to get the midi file. If you're using the web midi player it will use that at the stop string too.


code_language.skript:
play midi "This" to player
wait 5 seconds
stop midi "This"
Fixed:
- A Yaml bug that generated folders instead of the file when using SkQuery??? This happened when the yaml file didn't exist.
- Made a create file system if trying to set yaml to a file that doesn't exist
- Fixed more bugs
- Fixed some null pointers

Nothing is new or noticable. Just some bugs I found while doing heavy testing.

I also found a few more bugs that haven't been fixed yet. Still looking into it and fixing them.

Enjoy :emoji_grinning:

By the way to anyone wondering. Yes this SkQuery version should work on most server versions, not just 1.11+