From c0fa11241588a7db3e6ad8750d7278fa6d19501a Mon Sep 17 00:00:00 2001 From: RoboMWM Date: Sun, 26 Feb 2017 14:08:48 -0800 Subject: [PATCH] Fix potential loss of precision when calculating default respawn ticks --- src/main/java/to/us/tf/DeathSpectating/ConfigManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/to/us/tf/DeathSpectating/ConfigManager.java b/src/main/java/to/us/tf/DeathSpectating/ConfigManager.java index 946108c..1c1d9ee 100644 --- a/src/main/java/to/us/tf/DeathSpectating/ConfigManager.java +++ b/src/main/java/to/us/tf/DeathSpectating/ConfigManager.java @@ -54,7 +54,7 @@ public class ConfigManager config.options().copyDefaults(true); instance.saveConfig(); - respawnTicks = (long)(config.getDouble("respawnTimeInSeconds") * 20L); + respawnTicks = (long)((config.getDouble("respawnTimeInSeconds") * 20L)); usePermissionForSpectating = config.getBoolean("usePermissionForSpectating"); if (config.getBoolean("useDamageCauseBlacklist")) { @@ -103,11 +103,11 @@ public class ConfigManager ConfigurationSection titleSection = config.getConfigurationSection("titleMessages"); if (titleSection == null) titleSection = config.createSection("titleMessages"); - + if (titleSection.getStringList("titles").isEmpty()) - titleSection.set("titles", new ArrayList(Arrays.asList("&cYou died!", "&cGame over!"))); + titleSection.set("titles", new ArrayList<>(Arrays.asList("&cYou died!", "&cGame over!"))); if (titleSection.getStringList("subtitles").isEmpty()) - titleSection.set("subtitles", new ArrayList(Arrays.asList("Respawning in {0}", "Score: &e{1}", "Score: &e{1}&f, Respawning in {0}"))); + titleSection.set("subtitles", new ArrayList<>(Arrays.asList("Respawning in {0}", "Score: &e{1}", "Score: &e{1}&f, Respawning in {0}"))); instance.saveConfig(); }