adding autocomplete for home

This commit is contained in:
Mylloon 2021-03-06 00:55:30 +01:00 committed by GitHub
parent e739c5f83b
commit 3668cab2ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

11
main.sk
View file

@ -89,7 +89,7 @@ command /delhome <text>:
clear {home.%player's uuid%.%text-arg%}
send "Maison &a%text-arg%&r supprimée."
else:
send "&4Ce home n'existe pas"
send "&4Ce home n'existe pas."
make player execute command "listhome"
command /home [<text>]:
@ -104,9 +104,16 @@ command /home [<text>]:
send "&aTéléportation vers &9%{_name}% &a!"
teleport player to {home.%player's uuid%.%{_name}%}
else:
send "&4Le home '&c%{_name}%' &4n'existe pas"
send "&4Le home '&c%{_name}%' &4n'existe pas."
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:
description: Liste des tes maisons
executable by: players