einfachtheo

Can u make a skript Commandhider make so Every command will not be shows only these that are selected in skript Thank you

Kodari AI
KodariJul 22 at 8:18 pm 4
CommandHiderSkript
A configurable Skript command-hiding system that limits player tab completion to only the commands listed in the script options. It supports a bypass permission for staff, automatically reloads the visible command list when the script loads, and hides argument suggestions for unlisted commands while preserving normal usage for approved commands.

Place commandhider.sk in plugins/Skript/scripts/, edit the visible-commands option, then run:

Plain Text
/sk reload commandhider

Players with commandhider.bypass can still see all command suggestions. This controls tab completion; completely removing commands from the modern client command tree or /help may require a packet-based addon such as SkBee or ProtocolLib.

Kodari can make mistakes. Review important code before using.
Files
commandhider.sk
Code
1 42
commandhider.sk
# CommandHiderSkript
# Place this file in plugins/Skript/scripts/
# Configure visible commands below, then use: /sk reload commandhider

options:
    # Use command names without the leading slash.
    # Separate multiple commands with commas.
    visible-commands: help, spawn, rules, msg, r, tell, t
    bypass-permission: commandhider.bypass

on script load:
    delete {commandhider.visible::*}

    set {_configured::*} to split "{@visible-commands}" at ","
    loop {_configured::*}:
        set {_command} to loop-value
        replace all " " in {_command} with ""
        replace all "/" in {_command} with ""
        set {_command} to lowercase {_command}

        if {_command} is not "":
            add {_command} to {commandhider.visible::*}

    send "&aCommandHider loaded successfully." to console

on tab complete:
    if player has permission "{@bypass-permission}":
        stop

    set {_input} to event-string
    replace all "/" in {_input} with ""
    set {_parts::*} to split {_input} at " "
    set {_root-command} to {_parts::1}

    # At the root command level, only show configured commands.
    if {_parts::2} is not set:
        set tab completions to {commandhider.visible::*}
        stop

    # Hide argument suggestions for commands that are not configured.
    if {_root-command} is not in {commandhider.visible::*}:
        clear tab completions