options:
flightDuration: 10 # czas trwania latania w minutach
command /stworzbon:
trigger:
give player paper named "&bBon na latanie" with lore "&7Kliknij PPM, aby aktywować|&7latanie na &a%{options::flightDuration}% minut!"
enchant the player's tool with unbreaking 11
on right click holding paper:
if name of player's tool is "&bBon na latanie":
if player's tool is enchanted with unbreaking 11:
if {flightTime.%uuid of player%} is not set:
set {flightTime.%uuid of player%} to %{options::flightDuration}%
set flight mode of the player to true
send "&aAktywowałeś latanie na %{options::flightDuration}% minut!" to the player
remove 1 paper named "&bBon na latanie" from player's inventory
else:
send "&cJuż aktywowałeś latanie!" to the player
every 1 minute:
loop all players:
if {flightTime.%uuid of loop-player%} is set:
subtract 1 from {flightTime.%uuid of loop-player%}
if {flightTime.%uuid of loop-player%} <= 0:
set flight mode of loop-player to false
clear {flightTime.%uuid of loop-player%}
send "&cTwoje latanie właśnie się skończyło!" to loop-player
on join:
if {flightTime.%uuid of player%} is set and {flightTime.%uuid of player%} > 0:
set flight mode of the player to true
on quit:
if {flightTime.%uuid of player%} is set:
clear {flightTime.%uuid of player%}
Pytanie
Mrddkdkkd 1
options:
flightDuration: 10 # czas trwania latania w minutach
command /stworzbon:
trigger:
give player paper named "&bBon na latanie" with lore "&7Kliknij PPM, aby aktywować|&7latanie na &a%{options::flightDuration}% minut!"
enchant the player's tool with unbreaking 11
on right click holding paper:
if name of player's tool is "&bBon na latanie":
if player's tool is enchanted with unbreaking 11:
if {flightTime.%uuid of player%} is not set:
set {flightTime.%uuid of player%} to %{options::flightDuration}%
set flight mode of the player to true
send "&aAktywowałeś latanie na %{options::flightDuration}% minut!" to the player
remove 1 paper named "&bBon na latanie" from player's inventory
else:
send "&cJuż aktywowałeś latanie!" to the player
every 1 minute:
loop all players:
if {flightTime.%uuid of loop-player%} is set:
subtract 1 from {flightTime.%uuid of loop-player%}
if {flightTime.%uuid of loop-player%} <= 0:
set flight mode of loop-player to false
clear {flightTime.%uuid of loop-player%}
send "&cTwoje latanie właśnie się skończyło!" to loop-player
on join:
if {flightTime.%uuid of player%} is set and {flightTime.%uuid of player%} > 0:
set flight mode of the player to true
on quit:
if {flightTime.%uuid of player%} is set:
clear {flightTime.%uuid of player%}
wyskakuje blad
https://imgur.com/a/aFY9B7V
Edytowane przez MrddkdkkdOdnośnik do komentarza
Udostępnij na innych stronach
1 odpowiedź na to pytanie
Rekomendowane odpowiedzi
Dołącz do dyskusji
Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.