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.

API Expressions+ 0.dev3

Additional expressions for your Skript library

  1. jaylawl
    Supported Minecraft Versions:
    • 1.12
    Expressions+

    Discontinued
    This is now being developed as an add-on, grab it here:
    https://forums.skunity.com/resources/expressionsplus.638/

    This script provides you with several new expressions for use in your skript library. It is intentionally lacking effects & conditions, as expressions are all you need and size can be saved. If you consider some of the expressions' syntax a bit wanky, please feel free to suggest additional and/or better syntax.

    Note that this is supposed to be no more than a supplement to vanilla Skript. All expressions contained within this API are using spigot-methods and thus are hopefully likely to be added to vanilla Skript. Once that should happen, those features will be removed from Expressions+.


    Requirements
    Contents

    Misc
    Line break / New line
    Code (Skript):
    1. %br%
    Inserts a new line in a chat message, item's lore or json tooltip.

    All entities
    Fall distance
    Code (Skript):
    1. %entity%'s fall[ing] distance
    How far (in blocks/meters) an entity has fallen. This value resets to 0 on touchdown. Returns a number. Can be set to a number.

    Persistence / Despawn
    Code (Skript):
    1. %entity%'s persistence( |-)(state|value|ability)
    2. persistence( |-)(state|value|ability) of %entity%
    Whether an entity will despawn if too far away from players. This value is true by default for entities like villagers or animals. Returns booleans. Can be set to booleans.

    Nameplate visibility
    Code (Skript):
    1. %entity%'s [custom] name[[ |-](plate|tag)] visibility
    2. [custom] name[[ |-](plate|tag)] visibility of %entity%
    Whether an entity's custom name is permanently visible (as opposed to only being visible when being looked at from nearby). Returns booleans. Can be set to booleans.

    (In-)vulnerability
    Code (Skript):
    1. %entity%'s vulnerability
    2. vulnerability of %entity%
    Whether an entity is (in-)vulnerable. Invulnerable entities can still be damaged by players in creative mode. Returns booleans. Can be set to booleans.

    Silent entity
    Code (Skript):
    1. %entity%'s (silence|mute)( |-)(state|value)
    2. (silence|mute)( |-)(state|value) of %entity%
    Whether an entity is capable of producing sounds. Note that entities will still make footstep sounds regardless of this being set to true. Returns booleans. Can be set to booleans.

    Living entities
    Has line of sight (condition)
    Code (Skript):
    1.  
    2. %entity% (1¦(has[ got]|does have)|2¦does(n't| not) have) line of sight of %entity%
    3. %entity% (1¦is|2¦is(n't| not)) in %entity%'s line of sight
    4.  
    Whether an entity is in direct line of sight of another entity. This does not require an entity to be looking at another. Returns false if line of sight is broken by any block, including transparent ones.

    AI
    Code (Skript):
    1. %entity%'s ai
    2. ai of %entity%
    Whether an entity is capable of using it's AI goals. If this is set to false, and then reset to true later, the entity will behave normally again. Returns booleans. Can be set to booleans.

    Item Pickup
    Code (Skript):
    1. %entity%'s item[stack] pickup[( |-)state|ability]
    2. item[stack] pickup[( |-)state|ability] of %entity%
    Whether an entity is capable of picking up items laying on the ground. Returns booleans. Can be set to booleans.

    Leash Holder
    Code (Skript):
    1. %entity%'s leash holder
    2. leash holder of %entity%
    The leash holder of an entity. Setting a leash holder to an entity that can normally not be leashed (for example, a villager) will still work, but the leash will not render. Returns an entity. Can be set to an entity (propably only players).

    Armor stands
    Marker
    Code (Skript):
    1. %entity%'s marker( |-)(state|value)
    2. marker( |-)(state|value) of %entity%
    Whether an armor stand is a marker. Setting this to true will remove the hitbox of the affected armor stand, which can be helpful towards a better FPS performance. Returns booleans. Can be set to booleans.

    Small
    Code (Skript):
    1. %entity%'s small[ness]( |-)(state|value)
    2. small[ness]( |-)(state|value) of %entity%
    Whether an armor stand is small. Returns booleans. Can be set to booleans.

    Visibility (Full, Arms, Baseplate)
    Code (Skript):
    1. %entity%'s (1¦visibility|2¦arm( |-)visibility|3¦[base[ |-]]plate( |-)visibility)
    2. (1¦visibility|2¦arm( |-)visibility|3¦base( |-)plate( |-)visibility) of %entity%
    Whether either the entire armor stand, it's arms, or baseplate are visible. Armor stands are unaffected by invisibility potions. Returns booleans. Can be set to booleans.

    X/Y/Z of Head/Body/Arm/Leg Pose
    Code (Skript):
    1. [(x|y|z) of ]%entity%'s (1¦head|2¦(body|torso)|3¦left(-| )leg|4¦right(-| )leg|5¦left(-| )arm|6¦right(-| )arm)( |-)pose
    2. [(x|y|z) of ](1¦head|2¦(body|torso)|3¦left(-| )leg|4¦right(-| )leg|5¦left(-| )arm|6¦right(-| )arm)( |-)pose of %entity%
    Allows to modify all aspects of the armor stand pose. Returns degrees. Can be set to degrees.

    Item Frames
    Display Item
    Code (Skript):
    1. %itemframe%'s (display[ed]|show[n])( |-)item
    2. (display[ed]|show[n])( |-)item of %itemframe%
    The item that is currently held by an item frame. Returns 1 of the item frame's item. Can be set to an item(stack)

    Item Rotation
    Code (Skript):
    1. %itemframe%'s item rotation
    2. item rotation of %itemframe%
    The rotation of the item in the item frame. Returns an integer between 0 and 7 (as the NBT data would). Can be set to an integer. Also allows being added to, removed from and reset.

    Villagers
    Trader/Customer
    Code (Skript):
    1. %villager%'s [current ](trader|customer)
    2. [current ](trader|customer) of %villager%
    The player that is currently trading with the specified villager. Can't be set to anything.

    Profession
    Code (Skript):
    1. %villager%'s profession
    2. profession of %villager%
    The profession of a villager. This does not support to also change the career of a villager. Returns a string. Can be set to a string. ...set %villager%'s profession to "libriarian"

    Riches
    Code (Skript):
    1. %villager%'s riches
    2. riches of %villager%
    The amount of emeralds the villager acquired through trading. Returns an integer. Can be set to an integer.

    Recipes
    Code (Skript):
    1. %villager%'s (trades|recipes)
    2. (trades|recipes) of %villager%
    The offered trades of a villager. Can currently only be deleted.

    Mob Spawners
    Summoned mob
    Code (Skript):
    1. %block%'s (spawned|summoned)( |-)(mob|creature)[[ ]type]
    2. (spawned|summoned)( |-)(mob|creature)[[ ]type] of %block%
    Sets the mobtype that is spawned by the spawner. Returns a string. Can be set to a string. ...set %block%'s spawned mob to "ender dragon"

    Ageable mobs
    Age
    Code (Skript):
    1. %entity%'s age
    2. age of %entity%
    The age of an entity in ticks. Negative values represent babies. Returns an integer. Can be set to an integer.

    Agelock
    Code (Skript):
    1. %entity%'s age[ ]lock
    2. age[ ]lock of %entity%
    Whether an entity will age, setting this to false stops the mob's %age% from advancing. Note that setting this to false does not fully prevent the mob from maturing. For example, sheep can still grow up by consuming grass. Returns a boolean. Can be set to a boolean.

    Is this resource useful to you?
    Consider buying me a coffee or pizza if it is! Paypal: https://www.paypal.me/langejulian

Recent Updates

  1. Minor fix
  2. ++