feat: use #teleport methods for teleport handling on Fabric

This commit is contained in:
William278 committed 2025-02-18 21:23:54 +00:00
1 parent 412e25a1d7
commit e913b044ab
1 file changed
+13 -1
@@ -152,7 +152,19 @@ public class FabricUser extends OnlineUser {
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);
}