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.