uhhhhhhhh arg-1 arg-2 arg-3 is being the same tab????

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

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

kkaemok

Member
May 29, 2025
21
0
1
I am basically trying to make it so when typed /닉네임, the first tab completion would be the player names, then set/reset, then nothing (players type their wanted nicknames) and then colors... but it simply doesnt work... I am using skript and skbee and all of them are the newest... (I have no idea why skellett does not work now)

on tab complete of "/닉네임":
set {_input} to event-string
replace first "/닉네임 " in {_input} with ""

if {_input} is set:
set {_args::*} to split {_input} by " "
else:
clear {_args::*}

set {_argCount} to size of {_args::*}
if {_input} ends with " ":
add 1 to {_argCount}

if {_argCount} = 1:
# 첫 번째 인자: 플레이어 이름 탭 완성 (접속 중인 플레이어 목록)
set tab completions to all players
else if {_argCount} = 2:
# 두 번째 인자: "set" 또는 "reset"
set tab completions to "set", "reset"
else if {_argCount} = 3:
# 세 번째 인자: 원하는 이름 - 탭 완성 없음 (자유롭게 입력)
clear tab completions
else if {_argCount} = 4:
# 네 번째 인자: 색상 목록 (두 번째 인자가 "set"일 때만)
if {_args::2} is "set":
set tab completions to "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", "white"
else:
clear tab completions
else:
clear tab completions
 
I don’t think skellett is used for really anything anymore. I’m kinda confused by what you are doing tho, why not just use <player> in the command line? It’ll show all the players automatically. And if you want other stuff, set it individually in tab completions.
If this doesn’t work or isn’t what you want, I don’t know.
 
I am basically trying to make it so when typed /닉네임, the first tab completion would be the player names, then set/reset, then nothing (players type their wanted nicknames) and then colors... but it simply doesnt work... I am using skript and skbee and all of them are the newest... (I have no idea why skellett does not work now)

on tab complete of "/닉네임":
set {_input} to event-string
replace first "/닉네임 " in {_input} with ""

if {_input} is set:
set {_args::*} to split {_input} by " "
else:
clear {_args::*}

set {_argCount} to size of {_args::*}
if {_input} ends with " ":
add 1 to {_argCount}

if {_argCount} = 1:
# 첫 번째 인자: 플레이어 이름 탭 완성 (접속 중인 플레이어 목록)
set tab completions to all players
else if {_argCount} = 2:
# 두 번째 인자: "set" 또는 "reset"
set tab completions to "set", "reset"
else if {_argCount} = 3:
# 세 번째 인자: 원하는 이름 - 탭 완성 없음 (자유롭게 입력)
clear tab completions
else if {_argCount} = 4:
# 네 번째 인자: 색상 목록 (두 번째 인자가 "set"일 때만)
if {_args::2} is "set":
set tab completions to "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", "white"
else:
clear tab completions
else:
clear tab completions
Please send it as code format
 
I couldn't figure it out so I just stayed with the original...

# 접속 시 커스텀 이름 적용
on join:
if {customname::%uuid of player%} is set:
set tab list name of player to {customname::%uuid of player%}
set display name of player to {customname::%uuid of player%}
else:
if name of player is "kkaemok":
set {_default} to "깨목"
else if name of player is "HHHH_HHHH_HHHH":
set {_default} to "시윤"
else if name of player is "LearnToCombo":
set {_default} to "승윤"
else if name of player is "june110101":
set {_default} to "서준"
else:
stop

set tab list name of player to {_default}
set display name of player to {_default}

# 채팅 시 커스텀 이름 출력
on chat:
cancel event
broadcast "%display name of player%: %message%"

# /닉네임 명령어
command /닉네임 <player> <text> [<text>] [<text>]:
trigger:
set {_target} to arg-1
set {_mode} to arg-2
set {_name} to arg-3
set {_color} to arg-4

if {_target} is not name of player:
send action bar "&c자신의 이름만 변경할 수 있습니다!"
stop

if {_mode} is "reset":
delete {customname::%uuid of player%}

if name of player is "kkaemok":
set {_default} to "§a깨목"
else if name of player is "HHHH_HHHH_HHHH":
set {_default} to "§b시윤"
else if name of player is "LearnToCombo":
set {_default} to "§d승윤"
else if name of player is "june110101":
set {_default} to "§e서준"
else:
set {_default} to "§f%player%"

set tab list name of player to {_default}
set display name of player to {_default}
send action bar "&a이름이 기본값으로 초기화되었습니다: %{_default}%"
stop

if {_mode} is not "set":
send action bar "&c사용법: /닉네임 <자기이름> set <이름> [색상]"
stop

if {_name} is not set:
send action bar "&c사용법: /닉네임 <자기이름> set <이름> [색상]"
stop

if {_color} is not set:
set {_color} to "white"

# 색상 코드 매핑
if {_color} is "black":
set {_code} to "§0"
else if {_color} is "dark_blue":
set {_code} to "§1"
else if {_color} is "dark_green":
set {_code} to "§2"
else if {_color} is "dark_aqua":
set {_code} to "§3"
else if {_color} is "dark_red":
set {_code} to "§4"
else if {_color} is "dark_purple":
set {_code} to "§5"
else if {_color} is "gold":
set {_code} to "§6"
else if {_color} is "gray":
set {_code} to "§7"
else if {_color} is "dark_gray":
set {_code} to "§8"
else if {_color} is "blue":
set {_code} to "§9"
else if {_color} is "green":
set {_code} to "§a"
else if {_color} is "aqua":
set {_code} to "§b"
else if {_color} is "red":
set {_code} to "§c"
else if {_color} is "light_purple":
set {_code} to "§d"
else if {_color} is "yellow":
set {_code} to "§e"
else if {_color} is "white":
set {_code} to "§f"
else:
send action bar "&c존재하지 않는 색상입니다!"
stop

set {_finalname} to "%{_code}%%{_name}%"
set tab list name of player to {_finalname}
set display name of player to {_finalname}
set {customname::%uuid of player%} to {_finalname}
send action bar "&a이름이 %{_finalname}%&a(으)로 변경되었습니다."