changed respawn height on first respawn in elytrarace

added level indicator for stickfight
This commit is contained in:
2026-01-10 14:47:57 +01:00
parent d5c2f06409
commit 5cb71c5c32
2 changed files with 3 additions and 0 deletions

View File

@@ -224,7 +224,9 @@ public class ElytraRace extends StatelessGame {
} }
private void toCheckpoint(Player p) { private void toCheckpoint(Player p) {
CheckPointData data = this.playerCheckpoints.get(p);
Point checkpointPos = this.getRingPositionAtZ(this.playerCheckpoints.get(p).currentCheckpoint); Point checkpointPos = this.getRingPositionAtZ(this.playerCheckpoints.get(p).currentCheckpoint);
if(data.currentCheckpoint == 0) checkpointPos = this.getSpawn().add(0, 3, 0);
p.setVelocity(Vec.ZERO); p.setVelocity(Vec.ZERO);
p.setFlyingWithElytra(false); p.setFlyingWithElytra(false);
p.teleport(Pos.fromPoint(checkpointPos).add(0.5, 0, 0.5)); p.teleport(Pos.fromPoint(checkpointPos).add(0.5, 0, 0.5));

View File

@@ -122,6 +122,7 @@ public class Stickfight extends StatelessGame {
player.teleport(this.spawnPoints.get(player)); player.teleport(this.spawnPoints.get(player));
this.scoreMap.putIfAbsent(player, 0); this.scoreMap.putIfAbsent(player, 0);
this.scoreMap.put(player, this.scoreMap.get(player) + 1); this.scoreMap.put(player, this.scoreMap.get(player) + 1);
player.setLevel(this.scoreMap.get(player));
} }
} }