added color jump #12

Merged
jannis merged 5 commits from develop-colorjump into develop 2026-02-10 20:24:18 +00:00
Showing only changes of commit 2808393c23 - Show all commits

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)
if(playerMoveEvent.getNewPosition().y() >= 29)
return;
player.teleport(this.getSpawn());
if(this.isRunning && playerMoveEvent.getNewPosition().y() < 29) {
if(this.isRunning) {
this.getScore().insertResult(player);
player.teleport(this.getSpawn());
player.setGameMode(GameMode.SPECTATOR);
}
}