mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +00:00
feat: use #teleport methods for teleport handling on Fabric
This commit is contained in:
1 parent
412e25a1d7
commit
e913b044ab
1 file changed
+13
-1
@@ -152,7 +152,19 @@ public class FabricUser extends OnlineUser {
|
|||||||
plugin.runSync(() -> {
|
plugin.runSync(() -> {
|
||||||
player.stopRiding();
|
player.stopRiding();
|
||||||
player.getPassengerList().forEach(Entity::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);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user