Skip to content

Commit

Permalink
修复指令返回问题
Browse files Browse the repository at this point in the history
  • Loading branch information
windy664 authored Aug 9, 2024
1 parent ab76c23 commit cac39a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/windy/teleportoffset/TeleportOffset.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
Location location = player.getLocation();
findHighestNonAirBlockLocation(location);
player.teleport(location);
return true;
}else{
sender.sendMessage(Texts.help);
return true;
Expand Down Expand Up @@ -139,7 +140,7 @@ public void onPlayerTeleport(PlayerTeleportEvent event) {
// 在传送前设置玩家为无敌状态,确保玩家在传送过程中不会受到伤害
player.setInvulnerable(true);

// 获取玩家当前的实际 Y 坐标值并记录到日志中,以方便后续检查和比较
// 获取玩家当前的实际 Y 坐标值并记录到日志中,以方便后续检查和比较
Bukkit.getScheduler().runTaskLaterAsynchronously(TeleportOffset.this, () -> {
double currentY = player.getLocation().getY();
log("但是玩家" + playerName + "§c实际Y值是:" + currentY);
Expand Down

0 comments on commit cac39a0

Please sign in to comment.