This commit is contained in:
Luca 2021-11-22 15:59:59 +01:00
parent a0e46dd5a5
commit 16213e44d0
3 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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));

View File

@ -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);