command /spawn:
executable by: player
trigger:
if {spawn} is not set:
send "&cSpawn nie zostal ustawiony przez administratora, skontaktuj sie z nim!"
stop
apply nausea 2 to player for 15 seconds
send "&7Za &a10 sekund &7zostaniesz przeteleportowany na spawn! Nie ruszaj sie!"
set {_location} to location of player
loop 100 times:
wait 2 ticks
if distance between {_location} and location of player > 0.75:
send "&4Poruszyles sie, czym anulowales teleportacje."
remove nausea from player
stop
wait 1 tick
teleport player to {spawn}
remove nausea from player
send "&7Zostales przeteleportowany na &aspawn&7."
command /ustawspawn:
executable by: player
trigger:
if player is op:
set {spawn} to location of player
send "&aSpawn ustawiony."
else:
send "&cNie masz uprawnien do tej komendy."
Masz tutaj komendę /spawn z dodatkowymi rzeczami, takimi jak ruszanie anulujące teleportację. Spawn ustawiasz komendą /ustawspawn, której może użyć tylko operator.
Nausea na 15 sekund, dlatego, że potem i tak jest usuwana, co daje fajny efekt portalu na ekranie.
"Wait 1 tick" pomiędzy pętlą, a teleportem dlatego, że inaczej wykrywałoby teleport jako poruszenie się i anulowanie teleportacji.
Testowałem skrypt. Za błędy przepraszam, aczkolwiek nie powinno ich być :-D.