SkQuery [1.13-1.21+] icon

SkQuery [1.13-1.21+] -----

An updated SkQuery fork.




Updated to Skript 2.10.0. Older versions still supported.
  • Removed entities within chunks. Been in Skript since 2.5.
  • Removed arrow knockback. Been in Skript since 2.5.1
  • Removed flight mode. Now in Skript.
  • Removed exploded blocks. Now in Skript 2.8.6
  • Removed selected hotbar slot. Now in Skript.
  • Removed colored potion expression. Use new aliases.
  • Removed regain reason. Now in Skript.
  • Removed values. Now in Skript 2.7.
  • Removed max minecart speed. Now in Skript 2.5.1
  • Removed new line. Now in Skript.
  • Removed max itemstack stack. Now in Skript 2.1
  • Removed stop server. Now in Skript.

- Changed how the health scale works, to not be doubling the value anymore. (Closes https://github.com/SkQuery/SkQuery/issues/74)
- The `@noupdate::` block set effect was not registering, most likely due to the new markers in newer Skript versions. Added `set %blocks% to %itemtypes% with no [block] update` to allow this syntax to work again. (Closes https://github.com/SkQuery/SkQuery/issues/100)
- Fixed an issue collecting the ParserInstance in newer Skript versions. (Closes https://github.com/SkQuery/SkQuery/issues/153)
- Removed the pathfinding syntax. It's in vanilla Skript now. https://docs.skriptlang.org/docs.html?search=#EffPathfind
----------, Aug 3, 2023

- Updates to latest Spigot 1.19.4 and Skript 2.7.0-beta2
- Removes moon phase expression. It's in Skript now.
----------, Mar 25, 2023

Fixed a bug where if the provided world border was null, it would error, also updated library and latest 1.19.3
----------, Dec 15, 2022

Updated to latest Skript 2.6.3
Updated to Spigot 1.19
----------, Jul 16, 2022

Updated all libraries; Skript 2.6.1, Minecraft 1.18.1 and Shadow gradle.
Removed new uuid expression as it's in Skript now.
Fixed a debug error happening with the world border size expression.

Due to how Skript is removing versions equal and older than 1.12 and Mojang requiring latest Java versions. Backwards support for older versions is getting harder and harder, so the following will now apply;

Latest 4.1.6+ version only works with Skript 2.6.1+ and was compiled in Java 17 (MC 1.13+). If you're running 1.9-1.12 use SkQuery version 4.1.4. If you're running 1.13+ and have Java 17 use this version, if you are still using anything between Java 11 and Java 16 use version 4.1.5 or upgrade to Java 17. Click "Version History" tab to view older versions.
----------, Jan 27, 2022

This release only works with Skript 2.6+ https://github.com/SkriptLang/Skript/releases

- Updated to Skript 2.6-alpha1. Please make any bug reports regarding Skript in the SkriptLang issue tracker at https://github.com/SkriptLang/Skript/issues
- Updated to 1.16.5

- Removed health gain reason. It's in Skript now.
- Removed server list ping expressions. They're in Skript now.
- Removed recipes, SkQuery never had a good implementation of them.
- Fully removed custom syntax things. List here https://github.com/SkQuery/SkQuery/commit/9289ec47b418d19086d2d073a5a31011904ba8ef
----------, May 23, 2021

  • Removed custom events, expressions, property expression, and functions. These features were experimental and you should be using Skript's built in functions over SkQuery's implementation.
  • Bandage patch for recipes throwing a deprecated warning. I would highly suggest using another addon that handles recipes better over SkQuery. I will not be remaking the recipe system in SkQuery at this time.
  • Added a new syntax to force sleeping at a bed location (make|force) %player% [to] sleep at %location%
  • Recoded the item projectile syntax
  • Item projectile syntax now allows for multiple entities to fire at the same time.
  • Adapted the item projectile system to use ItemType over ItemStack. This may improve correct aliases lookup in older versions of Skript and/or Minecraft versions.
  • Updated some libraries

Please post bug reports at https://github.com/SkQuery/SkQuery/issues
----------, Oct 17, 2020

- Fixed a bug where initialization of a class from some unknown library the user had, would cause SkQuery to not load. ( #49 Thanks Qfrijters)
- Fixed a bug where SkQuery was checking a nulled value about MySQL credentials. ( #47 Thanks Creaous)


Report bugs at https://github.com/SkQuery/SkQuery/issues
----------, Aug 5, 2020

- Updated the midi player to have the new 1.14.2 noteblock sounds.
- Fixed a bug on 1.12 that caused falling blocks to not work properly. ( #25 Thanks Govindass)
- Updated to 1.15.2.
- Fixed some world border syntax, and also adjusted the stop midi effect to allow multiple entries.
----------, Jan 28, 2020

Fixed a conflict between size of %objects% of Skript and the new WorldBorder size expression.

This is because Skript's accepts all objects, and that's not something that is friendly to other syntaxes. The new syntax is
Code (Text):
(size|diameter) of world[ ]border[s] %worldborders% [over [a [(time|period) of]] %-timespan%]
Thanks aeonlamb ( #16)
----------, Jul 12, 2019

Welcome to SkQuery 4.1, this is the complete SkQuery story, adding all elements from the SkQuery 4 (pre1 and pre2) (Except Advancements and Npcs (Ok it's hard to maintain NMS)).

Added:
  • Added the ability for Tab Completions to work regardless of their capitalization. (Thanks PanGargamel #12)
  • Added Expression to get characters at indices from strings:
    • Code (Text):
      char[acter][s] at [index] %numbers% (within|in) %strings%
  • Added inventory name event expression:
    • Code (Text):
      inventory name
    • Example:
      Code (Text):
      on inventory click:
          broadcast "%inventory name%"
  • Added WorldBorder expressions. Type name: worldborder
    • World border center:
      • Code (Text):
        center of [world[ ]border[s]] %worldborders%

        %worldborders%'[s] [world[ ]border[s]] center
  • World border time:
    • Code (Text):
      warning time of [world[ ]border[s]] %worldborders%

      %worldborders%'[s] [world[ ]border[s]] warning time
  • World border distance:
    • Code (Text):
      warning distance of [world[ ]border[s]] %worldborders%

      %worldborders%'[s] [world[ ]border[s]] warning distance
  • World border damage amount:
    • Code (Text):
      damage [amount] of [world[ ]border[s]] %worldborders%

      %worldborders%'[s] [world[ ]border[s]] damage [amount]
  • World border damage buffer:
    • Code (Text):
      [damage] buffer of [world[ ]border[s]] %worldborders%

      %worldborders%'[s] [world[ ]border[s]] [damage] buffer
  • World border size:
    • Code (Text):
      (size|diameter) [over [a [(time|period) of]] %-timespan%] of [world[ ]border[s]] %worldborders%

      %worldborders%'[s] [world[ ]border[s]] (size|diameter) [over [a [(time|period) of]] %-timespan%]
  • Added WorldBorder locations within condition:
    • Code (Text):
      %locations% is [with]in [world[ ]border[s]] %worldborder%

      %locations% (isn't|is not) [with]in [world[ ]border[s]] %worldborder%
  • Added trail projectile:
    • Can only be used within the on shoot event
    • Data's aren't supported because the VisualEffect isn't accessible without parsing an expression to addons, and I haven't made a particle library yet.
    • Code (Text):
      trail projectile with %particles%
Fixed:
  • Fixed "Entity has potioneffect" condition to support multiples:
    • Before:
      Code (Text):
      %livingentity% (has|have) %potioneffecttype%

      %livingentities% does(n't| not) (has|have) %potioneffecttype%
      Before
    • After:
      Code (Text):
      %livingentities% (has|have) [potion [effect]] %potioneffecttypes%

      %livingentities% (doesn't|does not|do not|don't) have [potion [effect]] %potioneffecttypes%
  • Fixed Divisible condition to support multiples:
    • Before:
      Code (Text):
      %number% is divisible by %number%

      %number% is not divisible by %number%
    • After:

      Code (Text):
      %numbers% (is|are) divisible by %number%

      %number% (isn't|is not|aren't|are not) divisible by %number%
  • Fixed Prime condition to support multiples:
    • Before:
      Code (Text):
      %number% is [a] prime [number]

      %number% %number% is not [a] prime [number]
    • After:
      Code (Text):
      %numbers% (is|are) [a] prime [number]

      %numbers% (isn't|is not|aren't|are not) [a] prime [number]
  • Fixed a syntax mistake where "not" in:
    Code (Text):
    %itemtype% (isn't|is not) not [a] block
    • should be:
      Code (Text):
      %itemtype% (isn't|is not) [a] block
    • My guess is that this has always existed in SkQuery.
  • Fixed inventory name in 1.13+ with some changes to how you are going to be able to get it.
    • So in 1.13+ Spigot removed the ability to get the title of inventories, unless they're a container or an InventoryView.
    • Meaning SkQuery can only implement those ways, so the new ways to get the inventory name are the event value "inventory name" within the inventory click event.
    • Example:
      Code (Text):
      on inventory click:
          event-inventory is not player's inventory
          inventory name is "example"
          cancel event
    • The other way it's implemented is if the inventory has a holder aka a container being a block:
      Code (Text):
      on block break:
          if inventory name of inventory of event-block is "example":
              cancel event
    • Keep in mind doing name of %inventories% will go to Skript in which the newest Skript versions just outright removed the ability to grab the name.
      • So be advised it's not SkQuery not working if you don't add inventory name before.
    • Using the inventory name expression in versions lower than <1.13 will act normal prior to this update.
    • This should still work assuming it's the event-inventory in an inventory click event as well:
      Code (Text):
      on inventory click:
          event-inventory is not player's inventory
          broadcast inventory name
          broadcast inventory name of event-inventory
    • It's a bad way to check inventories against their name, so as an alternative you can add a player to a variable list:
      Code (Text):
      on script unload:
          delete {inventories::temp::*}

      command /example:
          trigger:
              set {_inventory} to chest with 2 rows named "example"
              set slots 4 and 13 of {_inventory} to light green stained glass pane named "&bSkQuery" with lore "&2&lLine 1" and "&6Line 2"
              add player to {inventories::temp::example-opened::*}
              open {_inventory} to player

      on inventory click:
          event-inventory is not player's inventory
          broadcast inventory name
          broadcast inventory name of event-inventory
          {inventories::temp::example-opened::*} contains player
          cancel event
          if index of clicked slot is 4 or 13:
              broadcast "&bYou clicked the SkQuery example."

      on inventory close:
          remove player from {inventories::temp::example-opened::*}

      on disconnect:
          remove player from {inventories::temp::example-opened::*}

Hope you enjoyed this semi-big update. Let us know if you find any bugs at https://github.com/SkQuery/SkQuery/issues

If you're a developer and wanna contribute to SkQuery you can do so at our repo https://github.com/SkQuery/SkQuery/pulls

Version naming is 4.1 as 4 already exists and this includes all of v4 which wasn't that much to be honest. Most of it is in vanilla Skript now.

Enjoy.
----------, Jul 12, 2019

Fixed bug in looping blocks of a cube
----------, May 2, 2019

  • Removed fireworks, I added them to Vanila Skript. (Pop firework still exists though as that's reflection)
  • Removed BookOf expression, it generated a book by string, it was a dumb implementation. Books are in Vanila Skript now.
  • Removed SkQuery version expression, not needed.
  • Fixed Skript 2.3 color issues.
Started experimental documentation http://skquery.github.io

SkQuery is now a Github organization, report bugs here https://github.com/SkQuery/SkQuery/issues
----------, Apr 13, 2019

Added:
  • Midi is playing condition;
Code (Text):
midi [ids] %strings% (are|is) playing

midi [ids] %strings% (are|is)(n't| not) playing
  • Location is within now accepts multiple locations;
Code (Text):
%locations% (is|are) within %location% (to|and) %location%

%locations% (are|is)(n't| not) within %location% (to|and) %location%
  • Revamped the whole Midi system, made it sound better, use 1.12 sounds, and performance boost (Will default to 1.8 sounds when 1.8-1.11 is installed)
  • Added a Util class for maintaining 1.9+ support

Fixed:
  • A null pointer in the Yaml.
  • A null pointer in the Midi system
  • 1.13 sounds and deprecated methods not working.
  • Changed some deprecated methods to work for both those deprecated methods and new methods in case the user is either running on 1.8 or 1.13+
  • Fixed the stop midi effect not working sometimes.
  • Fixed 1.13 issues with Materials.

Removed:
  • Removed the old v1 Visualizer system (Not Format slot, that's v2)
  • Moved all custom util classes into just utils.

Please report bugs at https://github.com/TheLimeGlass/SkQuery/issues
Otherwise myself or other developers will never see the bug report or forget.

I love SkQuery's Midi system way more than NoteBlockAPI to be honest. Always have, always will, sounds much better.

Video demo of the new Midi system;
----------, Feb 20, 2019

This version of SkQuery has about 30% of it's code rewritten for better performance. This version has the removal of lore because it collided with vanilla Skript 2.3 versions as it has a lore now. This version is designed to only work with 2.3+ Skript builds.
----------, Dec 3, 2018

It has been awhile since I posted an update for SkQuery, there hasn't been any issues with it, so there is no need to post an update.

A user recently reported that the client sign effect doesn't work, so I fixed it and here is that version.

I only have three plans for this fork at the moment.

1.) Re-add all the stuff that was removed over the course of this and Gatt's fork.
2.) Code clean
3.) 1.13 support.

I have done a bit of code clean in the whole system of registering and lots of other places, I can't remember any changes either since it's been so long, no new stuff, all internals.

And lastly, when 1.13 Skript comes out, I will be sure to keep this updated as so many people use it. Thanks again.
----------, Aug 3, 2018

Fixed:
  • Some compare classes not working in some cases.
  • Some null pointers
  • Fixed up some Lamba things
  • Changed how some things work, no noticeable difference.
Added:
  • A DEV_LIME boolean field for developers to tell if the server is running this fork.
  • A DISABLE_YAML boolean field for developers to disable SkQuery's yaml. Skellett uses this.
  • A method to disable the Yaml of SkQuery. SkQuery.disableYaml(boolean)
  • All these above are in the SkQuery.class
  • Added the ability to control Lamba's internally better (Developers addition)
  • Added a for each effect. This allows you to do multiple things with a lamba and lists
    Code (skript (Unknown Language)):
    %objects% for each %lambda%

    and

    %objects% where %predicate% for each %lambda% respectively
    The respectively makes the effect run double/triple/quad/infinite condition and effects simultaneously. So if the first lamba condition is true, it will run the first lamba effect. If the seventh lamba condition is true, it will run the seventh lamba effect etc.
  • Added beta testing lamba expressions. Was playing around with these. They shouldn't interfere or be visibly usable at the moment.
  • Re-added MySQL options and stuff for the time being. Revamping this later in it's own addon maybe.
Examples:

Code (skript (Unknown Language)):
function getConnectedBlocks(block: block):
    add {_block} to {return::*}
    loop all blocks in radius 1 around location of {_block} where [type of block input is type of {_block}]->[{return::*} doesn't contain block input]:
        add loop-value to {return::*}
        getConnectedBlocks(loop-value)
command /replace <item> <number> <item>:
    trigger:
        set {_now} to now
        getConnectedBlocks(target block)
        {return::*} where [chance of argument 2%] for each [set block at block input to argument 1]->[set block above block input to argument 3]
        broadcast "%difference between now and {_now}%"
        delete {return::*}
command /change <item>:
    trigger:
        set {_now} to now
        getConnectedBlocks(target block)
        {return::*} for each [set block at block input to argument]->[set block above block input to argument]
        broadcast "%difference between now and {_now}%"
        delete {return::*}
command /test:
    trigger:
        "this", "test.", "test2.", "is" and "dope" where [string input doesn't contain "."] for each [set string input to "&6%string input%"]->[broadcast "%string input% + %loop input%"]
command /assigner:
    trigger:
        all players where [size of {team::red::*} > {team::blue::*}]->[size of {team::blue::*} > {team::red::*}] for each [broadcast "&c&l%player input% is now on blue"]->[broadcast "&c&l%player input% is now on red"] respectively
The last respectively syntax adds the player to red if it's low or adds them to blue if the team is low occupied. I can help people understand the for each more if you PM me on SkUnity, Spigot or Discord, or you can just tag me.


This is probably the last update for awhile until 1.13 breaks this addon.
----------, Nov 16, 2017

Fixed an error that crashed SkQuery with latest Bensku's edit dev-32. I predicted this was going to happen so I had this made for myself awhile ago.
----------, Oct 28, 2017

  • Added the ability to get the number/integer input of the "evaluate lamba" effect from the last update.
Example:
Code (skript (Unknown Language)):
do 5 times [broadcast "This is the %number input% loop"]
----------, Jul 6, 2017

Fixed:
  • Fixed some minor bugs.
  • Fixed some null pointers.
  • Updated the main thread with more info about the build.
  • Fixed pop firework (Not client side anymore) but works.
Code (skript (Unknown Language)):
#Changed syntax from
pop %fireworkeffects% at %locations% to %players%

#to

(detonate|pop) %fireworkeffects% at %locations%
Added:
  • Added some fixes/improvements from VirusTotal's edit.
  • Added the ability for the "evaluate lamba" to execute multiple times.
Code (skript (Unknown Language)):
do [%-number% time[s]] %lambda%
Examples:
Code (skript (Unknown Language)):
do [broadcast "message 1 time"]

do 5 times [broadcast "message 5 times"]

pop ball large firework coloured red at player's location

pop ball firework coloured blue, yellow and light green at player
----------, Jul 6, 2017

Added:
- Added former movement location. Uses the getFrom() in the on any movement that never existed.
Code (skript (Unknown Language)):
([the] (past|former) move[ment] [location]
- Added settable relative option to the time relative syntax.
Code (skript (Unknown Language)):
(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 (skript (Unknown Language)):
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"
----------, Jun 19, 2017

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 (skript (Unknown Language)):
#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 (skript (Unknown Language)):
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
----------, Jun 3, 2017

Changed:
Code (Text):
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
----------, Mar 25, 2017

Added the ability to stop a midi while it's playing.
Code (skript (Unknown Language)):
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 (skript (Unknown Language)):
play midi "This" to player
wait 5 seconds
stop midi "This"
----------, Feb 21, 2017

Resource Information
Author:
----------
Total Downloads: 205,922
First Release: Feb 19, 2017
Last Update: Yesterday at 6:22 AM
Category: ---------------
All-Time Rating:
48 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings