Adds a hardcore game-mode ignoring checkpoints

This commit is contained in:
2023-04-28 15:05:36 +02:00
parent 701cdd81eb
commit e039840e89
5 changed files with 49 additions and 4 deletions

View File

@@ -16,6 +16,11 @@ public enum ParkourArenaGameMode implements ConfigurationSerializable, ArenaGame
* The default game-mode. Failing once throws the player out.
*/
DEFAULT,
/**
* A hard-core game mode where no checkpoints are allowed
*/
HARDCORE,
;
/**

View File

@@ -43,6 +43,15 @@ public class ParkourArenaSession extends AbstractArenaSession {
this.entryState.setArenaState();
}
/**
* Gets the game-mode the player is playing in this session
*
* @return <p>The game-mode for this session</p>
*/
public @NotNull ParkourArenaGameMode getGameMode() {
return this.gameMode;
}
/**
* Registers the checkpoint this session's player has reached
*
@@ -118,6 +127,7 @@ public class ParkourArenaSession extends AbstractArenaSession {
protected String getGameModeString() {
return switch (this.gameMode) {
case DEFAULT -> "default";
case HARDCORE -> "hardcore";
};
}