This commit is contained in:
parent
c4e22963d6
commit
b828ef1f7a
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>EssentialsD</artifactId>
|
||||
<version>1.18.11</version>
|
||||
<version>1.18.12</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>EssentialsD</name>
|
||||
|
@ -151,16 +151,15 @@ public class TeleportManager {
|
||||
|
||||
/**
|
||||
* 把玩家传送到指定位置 并更新上次传送的位置
|
||||
* 需要使用 schedule 传送
|
||||
*
|
||||
* @param player 玩家
|
||||
* @param location 位置
|
||||
*/
|
||||
private void doTeleportSafely(Player player, Location location) {
|
||||
public void doTeleportSafely(Player player, Location location) {
|
||||
location.getWorld().getChunkAtAsyncUrgently(location).thenAccept((chunk) -> {
|
||||
updateLastTpLocation(player);
|
||||
location.setY(chunk.getWorld().getHighestBlockYAt(location) + 1);
|
||||
player.teleportAsync(location, PlayerTeleportEvent.TeleportCause.PLUGIN);
|
||||
_last_tp_location.put(player.getUniqueId(), location);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user