From f633b7dab23fb25d929728d2b4c4935b84e864da Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Mon, 3 Aug 2020 18:30:05 +0200 Subject: [PATCH] Fix for row interval --- src/main/java/com/songoda/skyblock/scoreboard/Driver.java | 2 +- src/main/java/com/songoda/skyblock/scoreboard/Row.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/songoda/skyblock/scoreboard/Driver.java b/src/main/java/com/songoda/skyblock/scoreboard/Driver.java index 7742f8bc..2bc414c7 100644 --- a/src/main/java/com/songoda/skyblock/scoreboard/Driver.java +++ b/src/main/java/com/songoda/skyblock/scoreboard/Driver.java @@ -41,7 +41,7 @@ class Driver extends BukkitRunnable { for(int i = 1; i<16; i++) { List rowLines = config.getStringList("Rows." + i + ".Content"); if(!rowLines.isEmpty()) { - Row row = new Row(rowLines, config.getInt("Interval")); + Row row = new Row(rowLines, config.getInt("Rows." + i + ".Interval")); rows.add(row); } } diff --git a/src/main/java/com/songoda/skyblock/scoreboard/Row.java b/src/main/java/com/songoda/skyblock/scoreboard/Row.java index a9e7803e..7431beee 100644 --- a/src/main/java/com/songoda/skyblock/scoreboard/Row.java +++ b/src/main/java/com/songoda/skyblock/scoreboard/Row.java @@ -17,7 +17,7 @@ class Row { public Row(List lines, int interval) { this.lines = lines; this.interval = interval; - this.current = 1; + this.current = 0; this.count = 0; if(interval < 0) { @@ -29,7 +29,7 @@ class Row { if(lines.isEmpty()) { line = ""; } else { - line = TextUtils.formatText(lines.get(0)); + line = TextUtils.formatText(lines.get(current)); } }