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

Contributors
Lego_freak1999, TPGamesNL
Supported Minecraft Versions
  1. 1.13
  2. 1.14
  3. 1.15
  4. 1.16
  5. 1.17
  6. 1.18
  7. 1.19
Warning!
Don't use this api as a dependency! I need some feedback to resolve possible bugs to make this a stable api.

This api allows u to use vanilla minecraft command target selectors as expressions or arguments in skript.

A target selector is used to target players or entities in your game commands. There are 5 target selectors that you can choose from.

More info:
https://www.digminecraft.com/getting_started/target_selectors.php

1.13 or up.
@a, @p, @e, @r, @s.
all selector tags like [distance], [name], [type].
player, command_block and console executers.

Bukkit 1.13+ (and ofc Spigot/Paper also work since they based on bukkit)
Skript 2.4 https://github.com/SkriptLang/Skript/releases
Skript-Reflect 2.2.2+ https://www.spigotmc.org/resources/skript-reflect.82259/

Code:
Expressions:
@(a|e|p|r|s)[\[<(.+)>\]] from %command sender%
[@]%object% from %command sender%

Code:
#Looping a Basic selector

command /example1:
    trigger:
        loop @a from command sender:
            send "Hi!" to loop-selected

#Basic selector

command /example2:
    trigger:
        send "Hi!" to @a from command sender

#Basic selector2

command /example3:
    trigger:
        send "Hi!" to @p from command sender

#Basic argument selector

command /example4 <text>:
    trigger:
        send "Hi!" to @arg 1 from command sender

#Looping a Basic selector and getting its location

command /example5:
    trigger:
        loop @e from command sender:
            set {_s} to loop-selected #Need to set to a var first bc of a bug
            send "%{_s}% %location of {_s}%" to @a from command sender

#Expressions in selectors
command /sendtoteam <text>:
    trigger:
        set {_selector} to "@a[team=%arg 1%]"
        send "Hi!" to @{_selector} from player

#Advanced selector

on right click on netherrack:
    send "Hello everybody close by!" to @a[distance=0..10] from player

#More info about the bug:

Fixing expected bugs.

Suggestions? (No 1.12 or lower support expected.)
Author
Lego_freak1999
Downloads
805
Views
805
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from Lego_freak1999

Latest updates

  1. Optimized 0.0.2

    Done some optimalizations. Thanks to @TPGamesNL

Latest reviews

Works fine for me! 1 suggestion, could you add support to execute a command to a player on the same team as a command sender. Ex 'send "hello world!" to same team as command sender' (Im using vanilla scoreboard teams). I'm new to scipting/skript so if this is already a thing please let me know!
Lego_freak1999
Lego_freak1999
Thanks for the review! U got a answer in ur dm.