So i am making a dragon plugin which lets player hatch and ride dragons for my server but i can't make the player ride a dragon
This is the code of me trying to make them ride the dragon:
if i do this nothing happens if i right click on the dragon and the name of the dragon also doesn't get set
This is the code of me trying to make them ride the dragon:
Code:
on right click on ender dragon:
if name of clicked entity is "&c%player%'s dragon":
make player ride clicked entity
while vehicle of player is clicked entity:
if block infront of player's vehicle is not air or tall grass or long grass:
if block above block infront of player's vehicle is air:
push player's vehicle upwards at speed 0.2
push player's vehicle in horizontal direction of player at speed 0.5
wait 0.1 seconds
command /dragon-spawn:
trigger:
spawn ender dragon at location of player
tame last spawned ender dragon to player
set name of last spawned ender dragon to "&c%player% dragon"
if i do this nothing happens if i right click on the dragon and the name of the dragon also doesn't get set