Skip to content

Commit

Permalink
feat: use #teleport methods for teleport handling on Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Feb 18, 2025
1 parent 412e25a commit e913b04
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,19 @@ public void teleportLocally(@NotNull Location location, boolean async) throws Te
plugin.runSync(() -> {
player.stopRiding();
player.getPassengerList().forEach(Entity::stopRiding);
player.teleportTo(FabricHuskHomes.Adapter.adapt(location, server, entity -> handleInvulnerability()));
//#if MC==12104
player.teleport(
world, location.getX(), location.getY(), location.getZ(),
Set.of(),
location.getYaw(), location.getPitch(),
true
);
//#else
//$$ player.teleport(
//$$ world, location.getX(), location.getY(), location.getZ(),
//$$ location.getYaw(), location.getPitch()
//$$ );
//#endif
}, this);
}

Expand Down

0 comments on commit e913b04

Please sign in to comment.