From 2808393c236b2f8f2dc58c6c5955da36b101f08b Mon Sep 17 00:00:00 2001 From: jannis Date: Tue, 10 Feb 2026 21:22:32 +0100 Subject: [PATCH] solved pr comments --- .../game/stateless/types/colorJump/ColorJump.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/mhsl/minenet/minigames/instance/game/stateless/types/colorJump/ColorJump.java b/src/main/java/eu/mhsl/minenet/minigames/instance/game/stateless/types/colorJump/ColorJump.java index d09ac55..fef6c13 100644 --- a/src/main/java/eu/mhsl/minenet/minigames/instance/game/stateless/types/colorJump/ColorJump.java +++ b/src/main/java/eu/mhsl/minenet/minigames/instance/game/stateless/types/colorJump/ColorJump.java @@ -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); } }