changed respawn height on first respawn in elytrarace
added level indicator for stickfight
This commit is contained in:
@@ -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));
|
||||||
|
|||||||
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user