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.

Script Tab Completer API 1.1.0

this code creates effects and expressions that can be used to create a custom tab completer

  1. _JustDylan_
    Contributors:
    _JustDylan_
    Supported Minecraft Versions:
    • 1.12
    Dependence:
    skript and skript-mirror

    Event for tab completion:
    on "org.bukkit.event.server.TabCompleteEvent":

    Effects:
    set completions to %texts% at %text%:
    example:
    - set completeions to {completions::*} at tab arg 2

    Expressions:
    tabbed command
    - returns the tabbed command
    tab arg[ument]( |-)%*number%
    - returns tabbed argument at argument %number%
    buffer
    - returns the chat buffer
    event.getSender()
    - returns the sender

    example:
    Code (Skript):
    1.  
    2. #example
    3. import:
    4.     java.io.File
    5. expression skripts:
    6.     get:
    7.         set {_directory} to new File("plugins/Skript/scripts/")
    8.         loop ...{_directory}.listFiles():
    9.             add loop-value.getName() to {_scripts::*}
    10.         return {_scripts::*}
    11. on "org.bukkit.event.server.TabCompleteEvent":
    12.     if tabbed command is "/skript" or "/sk":
    13.         if tab arg 2 isn't set:
    14.             set completions to "reload", "enable", "disable", "update" and "help" at tab arg 1
    15.         else:
    16.             if tab arg 3 isn't set:  
    17.                 if tab arg 1 is "update":
    18.                     set completions to "check", "changes" and "download" at tab arg 2
    19.                 else if tab arg 1 is "reload":
    20.                     set completions to skripts, "all", "config", "aliases" and "scripts" at tab arg 2
    21.                 else if tab arg 1 is "enable" or "disable":
    22.                     set completions to "all" and skripts at tab arg 2
    23.                 else:
    24.                     cancel event
    25.  

Recent Reviews

  1. iDarkyy
    iDarkyy
    5/5,
    Version: 1.0.1
    Awesome resource, very useful.
    Mangos are awesome too.
  2. I
    IHaxMC
    5/5,
    Version: 1.0.1
    this is very cool ! :)
  • About Us

    Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.
  • Support skUnity

    The staff team works very hard to make sure the community is running its best. This means constantly performing upgrades to systems and other features. This does cost a bit of money to keep doing. Donating to skUnity would allow the server to keep running smoothly for years to come!

    Support Us!
  • Join our Discord

    Discord is an all-in-one voice and text chat for gamers that’s free, secure, and works on both your desktop and phone.