Skript Things you probably didn't know were available in vanilla Skript

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

Mr_Simba

King of the Pridelands
Supporter
Dec 9, 2016
256
56
0
28
I've been getting tilted in the skUnity Discord for a while now when seeing people recommend add-ons for simple operations which have been possible in vanilla Skript for months or even a year or two now, so I figured it would be good to have a comprehensive list here of things which vanilla Skript now allows you to do which most people are stuck in the mentality of needing an add-on for. I'll also include a few specific super cool newer Skript syntaxes that make your code way cleaner even if they weren't previously addon-specific.

I'll include notes where I can on each new feature about the add-ons you previously would have needed to install for it. Note that this doesn't mean you don't need that add-on anymore since it may provide other functionality which you're using, it just means you no longer need an add-on for that specific feature.

Vanilla Skript Stuff That Was Previously Addon-Exclusive
  • Sounds: Sounds can be played with this syntax (previously from many add-ons). This supports vanilla OR Spigot sound enum names AND supports resource pack sounds.
  • Inventories: Skript has much more inventory support now (from many add-ons). You can:
  • Filters (skQuery Lambdas): Vanilla Skript supports filter statements just like skQuery's lambda which allow you to filter objects based on a condition. Some simple examples are send "congrats on being staff!" to all players where [player input has permission "staff"] or loop players in radius 10 of player where [player input isn't player].
  • Vectors: Skript has 100% full vector support now (previously some RandomSK and Vectors-Skript). Too many things to list but it's very powerful. Expressions here, a couple of effects here.
  • Full Flight Control: You can change flight state (there's also an expression for it) and can detect flight toggling (from skQuery?). These are in addition to the "is flying" condition which has existed for years.
  • Full Gliding Control: You can check/change elytra glide state and can detect glide toggling (from Skellett).
  • Metadata: Skript now supports metadata (previously RandomSK, now from Skellett). This lets you store data indexed by a key on either a block or entity which is automatically removed on server restart. There's a condition for has/doesn't have metadata and an expression to get a specific metadata value.
  • Scoreboard Tags: We also now support scoreboard tags (from Skellett). This is similar to metadata, but it can only store data on an entity and can only store text, but it persists across server restarts -- it's permanent and dies with the entity, and doesn't require variables. Simple example script using tags.
  • Client Blocks: You can now send client-side fake block changes to players (from skQuery?).
  • Checking Event Cancellation: You can now check if an event is canceled (from Skellett and SharpSK). You've always been able to cancel events but couldn't check if it was already canceled until recently.
  • Material Conditions: There are conditions for if an item/block is edible, burning, flammable, solid, or transparent (some from TuSKe). Simple but useful.
  • Action Bar: Vanilla Skript has its own effect to send action bar messages (previously in many add-ons).
  • Titles: Vanilla Skript now has its own effects for sending and resetting titles (previously in many add-ons, including Skellett and skRayFall)
  • On Ground: You can check if an entity is on the ground (from Skellett and probably others).
  • Jump Event: As of the 2.3 betas there is now an on jump event. This requires PaperSpigot (previously WildSkript and SkMorkaz)
  • Hand Swap Event: There is now an event when players swap their held items (between the offhand and main hand via the F key). I believe this was in skRayFall first.
  • Miscellaneous: You can get all offline players (from Skellett), the items within an item frame or dropped item with item of %entity% (from Skellett), get the amount of items in an item stack (from multiple add-ons), get the indices of a list variable (from MundoSK), get the highest solid block at a location (from MundoSK), get the author/pages/title of a book (from MundoSK), get teleport cause in a teleport event or spawn reason in a spawn event (both from Skellett), and get or modify the difficulty of a world (from MundoSK)

New Useful Stuff That Wasn't Previously In Add-ons
  • Command Cooldowns: Skript has built-in support for commands having a cooldown, with tons of expressions to give you info about the cooldown's remaining time, elapsed time, duration, the command's last usage date, and a permission to bypass the cooldown. To use the "elapsed time" or "last usage date" expressions you need to enable "keep command last usage dates" in your Skript config. You can also conditionally cancel a cooldown. Example command.
  • Default Value: You can now in one line provide an alternative default value if the first value isn't set. Example: broadcast {score::%player's uuid%} otherwise "%player% has no score!". This only sends their score if their variable is set, otherwise sending the 2nd message.
  • Ternary: You can now use ternary statements, which basically means returning a different value based on the result of a condition all in one line. Example: set {points} to 500 if {admin::%player's uuid%} is set else 100
  • Do If (Conditional Effects): Similar to the ternary, the do if effect allows you to execute an effect only if a condition passes. Note that this can be used to entirely replace if statements which only execute one line of code. Example: give a diamond to the player if {honor::%player's uuid%} > 50
  • Continue: You can now use continue in a loop to skip to the next loop value.
  • Full Server List Control: Skript now has an entire detailed suite of how your server appears in the server list. This is spread over many expressions and effects which are viewable here in the on server list ping event documentation but includes support for modifying the player count, server icon, MOTD, the text displayed in the hover list, and much much more.
  • Loaded: There are conditions for checking the load state of...
    • Scripts: You can check if a specific script is loaded. If you don't specify a script name it'll default to the current one which is useful for stuff like "while script is loaded" in an "on load" event!
    • World/Chunk: You can check if specific worlds or chunks are loaded.
  • Player Visibility: You can now control which players are visible to which other players. Main expression here along with hide/reveal effects.
  • Chat: You can control the chat message format in a chat event and can control the recipients.
  • Local Warning Suppression: You can now suppress certain warnings on a per-script basis.
  • Leash Control: You can modify who an entity is leashed to and query their leash holder.
  • Miscellaneous: You can get and set spectator target, get TPS values or ping if using PaperSpigot, set death event respawn location, control client-side weather, easily check if text starts or ends with other text, easily get a relative past/future time, and connect players to other servers via Bungee

Upcoming

Features being worked on that will be released in the future:

  • Firework support (from skQuery). (PR pending)
  • Resource pack support.

Feel free to correct me on what add-ons some features are or aren't from.
 
Last edited:
Thank you for creating this thread. This will most certainly be helpful to the majority of new players.
 
From what add-on is the expanded inventory support from? I would LOVE to use a custom inventory with a different inventory type other than chest!!!
 
  • Like
Reactions: Jacob105
From what add-on is the expanded inventory support from? I would LOVE to use a custom inventory with a different inventory type other than chest!!!

The entire point of this post is that all of this is in vanilla Skript. You can open any inventory type to a player in vanilla Skript, e.g. to open a hopper it'd be open hopper inventory to player.
 
Wow, you did a great job. It will be really usefull for me and for the comunity! Please, keep updating us with amazing posts like this one!
 
Wow, you did a great job. It will be really usefull for me and for the comunity! Please, keep updating us with amazing posts like this one!
Already confirmed with him that he will :emoji_slight_smile:. I found this interesting as well. Didn't realise what new things were added to Skript!
 
Updated with some other new stuff that has been added in the past month (10/28/2018):
  • Full extensive server list control
  • Action bar send effect
  • Jump and hand swap events (jump requires PaperSpigot)
  • "Do if" for conditional effect execution
  • Leash effect and expression
  • Updated the "upcoming" with things which either are already merged in and will be available next release or which currently have PRs open. Note that the ones coming from already open PRs have the off chance of not making it in (i.e. if the PR doesn't end up getting merged for one reason or another).
[doublepost=1542034361,1540754045][/doublepost]Updates (11/12/2018):
  • Local warning suppressions
  • Bungee connect effect
  • World difficulty expression
  • Title sending support
  • Updated upcoming features.
 
Updated with some other new stuff that has been added in the past month (10/28/2018):
  • Full extensive server list control
  • Action bar send effect
  • Jump and hand swap events (jump requires PaperSpigot)
  • "Do if" for conditional effect execution
  • Leash effect and expression
  • Updated the "upcoming" with things which either are already merged in and will be available next release or which currently have PRs open. Note that the ones coming from already open PRs have the off chance of not making it in (i.e. if the PR doesn't end up getting merged for one reason or another).
[doublepost=1542034361,1540754045][/doublepost]Updates (11/12/2018):
  • Local warning suppressions
  • Bungee connect effect
  • World difficulty expression
  • Title sending support
  • Updated upcoming features.
Add the blocks within thing and blocks within chunk, which can be found here: http://skriptlang.github.io/Skript/expressions.html#ExprBlocks, and here: http://skriptlang.github.io/Skript/expressions.html#ExprChunk
 
Those aren't new, the point of this thread is to show newer stuff thats been added to the Bensku fork lately, things that are commonly not known exist in Skript
Screen Shot 2018-11-12 at 2.29.59 pm.png

Screen Shot 2018-11-12 at 2.30.50 pm.png
 
Last edited: