This commit is contained in:
Luca 2021-11-22 17:21:51 +01:00
parent 5c5fc9a074
commit 10d81db1e4
2 changed files with 4 additions and 4 deletions

View File

@ -49,14 +49,14 @@ public class MovementListener implements Listener {
Location to = event.getTo();
Location from = event.getFrom();
if (to.getX() != from.getX() || to.getZ() != from.getZ()) {
if (game.getGameState() == GameState.STARTING) {
if (game.getGameState() == GameState.STARTING) {
if (to.getX() != from.getX() || to.getZ() != from.getZ()) {
player.teleport(from);
return;
}
}
if (playerData.getPlayerState() != PlayerState.RESPAWNING && game.getGameState() != GameState.ENDING) {
if (game.getGameState() != GameState.ENDING) {
if (player.getLocation().getY() <= game.getArena().getDeadZone()) {
Player killer = playerData.getLastDamager();
if (killer != null) {

View File

@ -31,7 +31,7 @@ public class RespawnRunnable extends BukkitRunnable {
cancel();
return;
}
if (this.playerData.getPlayerState() != PlayerState.RESPAWNING || this.playerData.getPlayerState() != PlayerState.PLAYING) {
if (this.playerData.getPlayerState() == PlayerState.SPAWN) {
cancel();
return;
}