Kod:
options:
default_irk: ""
effect_duration: 3600 # Saniye cinsinden, örneğin 3600 = 1 saat
command /ırk:
trigger:
open virtual chest with size 3 named "&6Irk Seçimi" to player
set slot 11 of player's current inventory to 339 named "&9Balık Adam" lore "&bSuda nefes alabilirsiniz." with lore "&eSol tıklayarak seçin."
set slot 15 of player's current inventory to 397:3 named "&cÖlümsüz" lore "&bÖlümünüzde eşyalarınızı kaybetmezsiniz." with lore "&eSol tıklayarak seçin."
on rightclick with 339:
if {player_irk.%player%} is not set:
set {player_irk.%player%} to "Balık Adam"
execute console command "effect give %player% minecraft:water_breathing %effect_duration% 1"
send "&aBalık Adam ırkını seçtiniz! Suda nefes alabilirsiniz." to player
else:
send "&cZaten bir ırk seçtiniz!" to player
on rightclick with 397:3:
if {player_irk.%player%} is not set:
set {player_irk.%player%} to "Ölümsüz"
send "&aÖlümsüz ırkını seçtiniz! Ölünce eşyalarınızı kaybetmezsiniz." to player
else:
send "&cZaten bir ırk seçtiniz!" to player
on death of a player:
if {player_irk.%player%} is set:
cancel event
execute console command "effect clear %player%"
delete {player_irk.%player%}
respawn player