mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-09-17 11:27:55 +02:00
Adds a hardcore game-mode ignoring checkpoints
This commit is contained in:
@@ -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,
|
||||
;
|
||||
|
||||
/**
|
||||
|
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user