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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Addon SkQuery [1.9-1.14+] 4.1.1

An updated SkQuery fork.

  1. SkQuery 4-pre1 and 4-pre2 additions.

    LimeGlass
    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):
        1. char[acter][s] at [index] %numbers% (within|in) %strings%
    • Added inventory name event expression:
      • Code (Text):
        1. inventory name
      • Example:
        Code (Text):
        1. on inventory click:
        2.     broadcast "%inventory name%"
    • Added WorldBorder expressions. Type name: worldborder
      • World border center:
        • Code (Text):
          1. center of [world[ ]border[s]] %worldborders%
          2.  
          3. %worldborders%'[s] [world[ ]border[s]] center
    • World border time:
      • Code (Text):
        1. warning time of [world[ ]border[s]] %worldborders%
        2.  
        3. %worldborders%'[s] [world[ ]border[s]] warning time
    • World border distance:
      • Code (Text):
        1. warning distance of [world[ ]border[s]] %worldborders%
        2.  
        3. %worldborders%'[s] [world[ ]border[s]] warning distance
    • World border damage amount:
      • Code (Text):
        1. damage [amount] of [world[ ]border[s]] %worldborders%
        2.  
        3. %worldborders%'[s] [world[ ]border[s]] damage [amount]
    • World border damage buffer:
      • Code (Text):
        1. [damage] buffer of [world[ ]border[s]] %worldborders%
        2.  
        3. %worldborders%'[s] [world[ ]border[s]] [damage] buffer
    • World border size:
      • Code (Text):
        1. (size|diameter) [over [a [(time|period) of]] %-timespan%] of [world[ ]border[s]] %worldborders%
        2.  
        3. %worldborders%'[s] [world[ ]border[s]] (size|diameter) [over [a [(time|period) of]] %-timespan%]
    • Added WorldBorder locations within condition:
      • Code (Text):
        1. %locations% is [with]in [world[ ]border[s]] %worldborder%
        2.  
        3. %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):
        1. trail projectile with %particles%
    Fixed:
    • Fixed "Entity has potioneffect" condition to support multiples:
      • Before:
        Code (Text):
        1. %livingentity% (has|have) %potioneffecttype%
        2.  
        3. %livingentities% does(n't| not) (has|have) %potioneffecttype%
        Before
      • After:
        Code (Text):
        1. %livingentities% (has|have) [potion [effect]] %potioneffecttypes%
        2.  
        3. %livingentities% (doesn't|does not|do not|don't) have [potion [effect]] %potioneffecttypes%
    • Fixed Divisible condition to support multiples:
      • Before:
        Code (Text):
        1. %number% is divisible by %number%
        2.  
        3. %number% is not divisible by %number%
      • After:

        Code (Text):
        1. %numbers% (is|are) divisible by %number%
        2.  
        3. %number% (isn't|is not|aren't|are not) divisible by %number%
    • Fixed Prime condition to support multiples:
      • Before:
        Code (Text):
        1. %number% is [a] prime [number]
        2.  
        3. %number% %number% is not [a] prime [number]
      • After:
        Code (Text):
        1. %numbers% (is|are) [a] prime [number]
        2.  
        3. %numbers% (isn't|is not|aren't|are not) [a] prime [number]
    • Fixed a syntax mistake where "not" in:
      Code (Text):
      1. %itemtype% (isn't|is not) not [a] block
      • should be:
        Code (Text):
        1. %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):
        1. on inventory click:
        2.     event-inventory is not player's inventory
        3.     inventory name is "example"
        4.     cancel event
      • The other way it's implemented is if the inventory has a holder aka a container being a block:
        Code (Text):
        1. on block break:
        2.     if inventory name of inventory of event-block is "example":
        3.         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):
        1. on inventory click:
        2.     event-inventory is not player's inventory
        3.     broadcast inventory name
        4.     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):
        1. on script unload:
        2.     delete {inventories::temp::*}
        3.  
        4. command /example:
        5.     trigger:
        6.         set {_inventory} to chest with 2 rows named "example"
        7.         set slots 4 and 13 of {_inventory} to light green stained glass pane named "&bSkQuery" with lore "&2&lLine 1" and "&6Line 2"
        8.         add player to {inventories::temp::example-opened::*}
        9.         open {_inventory} to player
        10.  
        11. on inventory click:
        12.     event-inventory is not player's inventory
        13.     broadcast inventory name
        14.     broadcast inventory name of event-inventory
        15.     {inventories::temp::example-opened::*} contains player
        16.     cancel event
        17.     if index of clicked slot is 4 or 13:
        18.         broadcast "&bYou clicked the SkQuery example."
        19.  
        20. on inventory close:
        21.     remove player from {inventories::temp::example-opened::*}
        22.  
        23. on disconnect:
        24.     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.
    bertek41 likes this.
Return to update list...