SkQuery [1.13-1.21+]

Addon SkQuery [1.13-1.21+] 4.3.2

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

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

  • 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
  • Like
Reactions: Diclo
- 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
- 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.
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:
(size|diameter) of world[ ]border[s] %worldborders% [over [a [(time|period) of]] %-timespan%]

Thanks aeonlamb (#16)
  • Like
Reactions: bertek41
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:
      char[acter][s] at [index] %numbers% (within|in) %strings%
  • Added inventory name event expression:
    • Code:
      inventory name
    • Example:
      Code:
      on inventory click:
          broadcast "%inventory name%"
  • Added WorldBorder expressions. Type name: worldborder
    • World border center:
      • Code:
        center of [world[ ]border[s]] %worldborders%
        
        %worldborders%'[s] [world[ ]border[s]] center
  • World border time:
    • Code:
      warning time of [world[ ]border[s]] %worldborders%
      
      %worldborders%'[s] [world[ ]border[s]] warning time
  • World border distance:
    • Code:
      warning distance of [world[ ]border[s]] %worldborders%
      
      %worldborders%'[s] [world[ ]border[s]] warning distance
  • World border damage amount:
    • Code:
      damage [amount] of [world[ ]border[s]] %worldborders%
      
      %worldborders%'[s] [world[ ]border[s]] damage [amount]
  • World border damage buffer:
    • Code:
      [damage] buffer of [world[ ]border[s]] %worldborders%
      
      %worldborders%'[s] [world[ ]border[s]] [damage] buffer
  • World border size:
    • Code:
      (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:
      %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:
      trail projectile with %particles%
Fixed:
  • Fixed "Entity has potioneffect" condition to support multiples:
    • Before:
      Code:
      %livingentity% (has|have) %potioneffecttype%
      
      %livingentities% does(n't| not) (has|have) %potioneffecttype%
      Before
    • After:
      Code:
      %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:
      %number% is divisible by %number%
      
      %number% is not divisible by %number%
    • After:

      Code:
      %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:
      %number% is [a] prime [number]
      
      %number% %number% is not [a] prime [number]
    • After:
      Code:
      %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:
    %itemtype% (isn't|is not) not [a] block
    • should be:
      Code:
      %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:
      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:
      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:
      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:
      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.
  • Like
Reactions: bertek41
  • 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
Added:
  • Midi is playing condition;
Code:
midi [ids] %strings% (are|is) playing

midi [ids] %strings% (are|is)(n't| not) playing
  • Location is within now accepts multiple locations;
Code:
%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;
  • Like
Reactions: bertek41
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.

Let me know if you run into any issues, other than lore, if you run into issues with lore report it on the Skript issue tracker.
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 fix 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.