Hi! I am trying to teleport a ship from player.draggingInformation.lastShipStoodOn
The relevant code can be found here:
ItemEvents.rightClicked(event => {
let player = event.player
if (event.item.id == 'tropicraft:pina_colada' && player.draggingInformation.isEntityBeingDraggedByAShip()){
player.tell("wow, you've been transported to the grand line!")
let ship = player.draggingInformation.lastShipStoodOn
player.teleportTo('tropicraft:tropics', player.x, (player.y + 100), player.z, player.yaw, player.pitch)
ship.teleportTo('tropicraft:tropics', ship.x, (ship.y + 100), ship.z, ship.yaw, ship.pitch)
}
}
)
I know that ships have to be teleported in game via /vs teleport rather than regular /teleport, but I can’t find any documention for doing this with js. Any help would be much appreciated!