Fix climb event

This commit is contained in:
Mathieu Strypsteen 2024-09-23 10:34:46 +02:00
parent 8d1d6b6bfb
commit 9f4b27c4c3

View file

@ -31,13 +31,13 @@ public class ClimbEvent extends Event {
return;
}
Player player = MC13DTL.board.getPlayers(team).getFirst();
Location location = new Location(Bukkit.getWorld("world"), player.getX(), -50, player.getZ());
Location location = new Location(Bukkit.getWorld("world"), ((int) player.getX()) + 0.5, -50, ((int) player.getZ()) + 0.5);
location.getBlock().setType(Material.AIR);
location.add(0, -1, 0).getBlock().setType(Material.AIR);
location.add(0, -2, 0).getBlock().setType(Material.STONE);
location.add(0, -1, 0).getBlock().setType(Material.STONE);
for (Player p : MC13DTL.board.getPlayers(team)) {
p.teleport(location);
p.teleport(location.add(0, 2, 0));
}
super.start();