Skip to content

Commit

Permalink
Fix UnsupportedOperationException
Browse files Browse the repository at this point in the history
  • Loading branch information
Zettovec committed Mar 21, 2024
1 parent 3826877 commit 40e02e1
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -672,12 +672,6 @@ public static void teleportVehicle(String licensePlate, Location location) throw
for (Entity entity : world.getEntities()) {
if (entity.getCustomName() != null && entity.getCustomName().contains(licensePlate)) {
entity.teleport(location);

if (!entity.getPassengers().isEmpty()) { // If there are any passengers in the vehicle, set their rotation as well
for (Entity passenger : entity.getPassengers()) {
passenger.setRotation(location.getYaw(), location.getPitch());
}
}
}
}
}
Expand Down

0 comments on commit 40e02e1

Please sign in to comment.