- Contributors
- _JustDylan_
- Supported Minecraft Versions
- 1.13
Dependence:
skript and skript-mirror
Event for tab completion:
on TabCompleteEvent:
(you will need to import 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:
skript and skript-mirror
Event for tab completion:
on TabCompleteEvent:
(you will need to import 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_language.skript:
#example
import:
java.io.File
java.util.Arrays
org.bukkit.event.server.TabCompleteEvent
expression scripts:
get:
set {_directory} to new File("plugins/Skript/scripts/")
loop ...{_directory}.listFiles():
add loop-value.getName() to {_scripts::*}
return {_scripts::*}
on TabCompleteEvent:
if tabbed command is "/skript" or "/sk":
if tab arg 2 isn't set:
set completions to "reload", "enable", "disable", "update" and "help" at tab arg 1
else:
if tab arg 3 isn't set:
if tab arg 1 is "update":
set completions to "check", "changes" and "download" at tab arg 2
else if tab arg 1 is "reload":
set completions to scripts, "all", "config", "aliases" and "scripts" at tab arg 2
else if tab arg 1 is "enable" or "disable":
set completions to "all" and scripts at tab arg 2
else:
cancel event