solved pr comments

This commit is contained in:
2026-02-10 21:22:32 +01:00
parent d0825695b3
commit 2808393c23

View File

@@ -70,13 +70,13 @@ public class ColorJump extends StatelessGame {
this.destroyAllExcept(this.currentBlock);
scheduler.scheduleTask(() -> {
this.onStart();
this.nextRound();
return stop;
}, TaskSchedule.seconds(3));
return stop;
}, TaskSchedule.seconds((long) this.roundTime));
if(this.roundTime > 0.5)
this.roundTime = this.roundTime *0.9;
this.roundTime = this.roundTime * 0.9;
long secondsLeft = Math.max(0, (long) this.roundTime);
@@ -130,12 +130,11 @@ public class ColorJump extends StatelessGame {
protected void onPlayerMove(@NotNull PlayerMoveEvent playerMoveEvent) {
var player = playerMoveEvent.getPlayer();
if(this.isBeforeBeginning && playerMoveEvent.getNewPosition().y() < 29)
player.teleport(this.getSpawn());
if(this.isRunning && playerMoveEvent.getNewPosition().y() < 29) {
if(playerMoveEvent.getNewPosition().y() >= 29)
return;
player.teleport(this.getSpawn());
if(this.isRunning) {
this.getScore().insertResult(player);
player.teleport(this.getSpawn());
player.setGameMode(GameMode.SPECTATOR);
}
}