diff --git a/src/main/java/rip/tilly/bedwars/game/Game.java b/src/main/java/rip/tilly/bedwars/game/Game.java index 5bb887a..781dae5 100644 --- a/src/main/java/rip/tilly/bedwars/game/Game.java +++ b/src/main/java/rip/tilly/bedwars/game/Game.java @@ -167,7 +167,7 @@ public class Game { aMaxZ = lastMinZ; } - if (location.getX() <= aMinX && location.getX() >= aMaxX && location.getZ() <= aMinZ && location.getZ() >= aMaxZ) { + if (location.getX() >= aMinX && location.getX() <= aMaxX && location.getZ() >= aMinZ && location.getZ() <= aMaxZ) { return true; } @@ -188,7 +188,7 @@ public class Game { bMaxZ = lastMinZ; } - if (location.getX() <= bMinX && location.getX() >= bMaxX && location.getZ() <= bMinZ && location.getZ() >= bMaxZ) { + if (location.getX() >= bMinX && location.getX() <= bMaxX && location.getZ() >= bMinZ && location.getZ() <= bMaxZ) { return true; } diff --git a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java index 241b7a2..868466f 100644 --- a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java +++ b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java @@ -52,7 +52,7 @@ public class MovementListener implements Listener { } } - if (from.getBlockY() <= game.getArena().getDeadZone() && game.getGameState() != GameState.ENDING) { + if (from.getBlockY() <= game.getArena().getDeadZone() && game.getGameState() != GameState.ENDING && playerData.getPlayerState() != PlayerState.RESPAWNING) { Player killer = playerData.getLastDamager(); if (killer != null) { this.plugin.getServer().getPluginManager().callEvent(new PlayerKillEvent(player, killer)); diff --git a/src/main/java/rip/tilly/bedwars/listeners/game/PlayerKillListener.java b/src/main/java/rip/tilly/bedwars/listeners/game/PlayerKillListener.java index 2de6152..27e2f61 100644 --- a/src/main/java/rip/tilly/bedwars/listeners/game/PlayerKillListener.java +++ b/src/main/java/rip/tilly/bedwars/listeners/game/PlayerKillListener.java @@ -38,6 +38,7 @@ public class PlayerKillListener implements Listener { } else { game.broadcast(playerData.getPlayerTeam().getChatColor() + player.getName() + " &efell into the void!"); } + new RespawnRunnable(this.plugin, player, playerData, game, playerTeam, 6, 6).runTaskTimer(this.plugin, 20, 20); } else { this.plugin.getGameManager().removePlayerFromGame(player, playerData, true);