adding autocomplete for home
This commit is contained in:
parent
e739c5f83b
commit
3668cab2ab
1 changed files with 9 additions and 2 deletions
11
main.sk
11
main.sk
|
@ -89,7 +89,7 @@ command /delhome <text>:
|
||||||
clear {home.%player's uuid%.%text-arg%}
|
clear {home.%player's uuid%.%text-arg%}
|
||||||
send "Maison &a%text-arg%&r supprimée."
|
send "Maison &a%text-arg%&r supprimée."
|
||||||
else:
|
else:
|
||||||
send "&4Ce home n'existe pas"
|
send "&4Ce home n'existe pas."
|
||||||
make player execute command "listhome"
|
make player execute command "listhome"
|
||||||
|
|
||||||
command /home [<text>]:
|
command /home [<text>]:
|
||||||
|
@ -104,9 +104,16 @@ command /home [<text>]:
|
||||||
send "&aTéléportation vers &9%{_name}% &a!"
|
send "&aTéléportation vers &9%{_name}% &a!"
|
||||||
teleport player to {home.%player's uuid%.%{_name}%}
|
teleport player to {home.%player's uuid%.%{_name}%}
|
||||||
else:
|
else:
|
||||||
send "&4Le home '&c%{_name}%' &4n'existe pas"
|
send "&4Le home '&c%{_name}%' &4n'existe pas."
|
||||||
make player execute command "listhome"
|
make player execute command "listhome"
|
||||||
|
|
||||||
|
on tab complete for "home":
|
||||||
|
if {home.%player's uuid%::*} is set:
|
||||||
|
set tab completions for position 1 to the first element of {home.%player's uuid%::*}
|
||||||
|
loop {home.%player's uuid%::*}:
|
||||||
|
if loop-value isn't the first element of {cards.%player%::*}:
|
||||||
|
add loop-value to tab completions
|
||||||
|
|
||||||
command /listhome:
|
command /listhome:
|
||||||
description: Liste des tes maisons
|
description: Liste des tes maisons
|
||||||
executable by: players
|
executable by: players
|
||||||
|
|
Loading…
Add table
Reference in a new issue