diff --git a/src/main/java/eu/carrade/amaury/UHCReloaded/game/UHGameManager.java b/src/main/java/eu/carrade/amaury/UHCReloaded/game/UHGameManager.java index 0e62569..9bb5342 100644 --- a/src/main/java/eu/carrade/amaury/UHCReloaded/game/UHGameManager.java +++ b/src/main/java/eu/carrade/amaury/UHCReloaded/game/UHGameManager.java @@ -76,6 +76,7 @@ public class UHGameManager { private final Boolean RANDOM_COLORS_IN_SOLO; private final Boolean BROADCAST_SLOW_START_PROGRESS; + private final Long GRACE_PERIOD; private final UHSound DEATH_SOUND; private UHCReloaded p = null; @@ -126,6 +127,7 @@ public UHGameManager(UHCReloaded plugin) // Loads the config RANDOM_COLORS_IN_SOLO = p.getConfig().getBoolean("teams-options.randomColors"); BROADCAST_SLOW_START_PROGRESS = p.getConfig().getBoolean("start.slow.broadcastProgress"); + GRACE_PERIOD = (long) Math.min(p.getConfig().getDouble("start.gracePeriod", 30), 15) * 20l; DEATH_SOUND = new UHSound(p.getConfig().getConfigurationSection("death.announcements.sound")); } @@ -595,7 +597,7 @@ public void run() { damageIsOn = true; } - }, 600L); + }, GRACE_PERIOD); } /** diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 48fbbe4..4fbf10d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -207,6 +207,10 @@ start: # Display a title to everyone when the game begins displayTitle: true + # Damages are enabled after this amount of seconds. + # Cannot be less than 15 seconds, to avoid initial-fall-related problems. + gracePeriod: 30 + death: