还原部分api提高兼容性

This commit is contained in:
zhangyuheng 2024-08-01 23:10:51 +08:00
parent 9180a2a4e0
commit 36a32c1d7b

View File

@ -636,7 +636,7 @@ public class PlayerEvents implements Listener {
Teleport.doTeleportSafely(player, to).thenAccept((success) -> {
if (!success) {
Notification.warn(player, "传送失败,你将被传送到复活点");
player.teleport(player.getBedSpawnLocation() == null ?
player.teleportAsync(player.getBedSpawnLocation() == null ?
player.getWorld().getSpawnLocation() :
player.getBedSpawnLocation()
, PlayerTeleportEvent.TeleportCause.PLUGIN);