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. IHaxMC
    IHaxMC
    5/5,
    Version: 1.0.1
    this is very cool ! :)