diff --git a/src/main/java/com/gamingmesh/jobs/config/BossBarManager.java b/src/main/java/com/gamingmesh/jobs/config/BossBarManager.java index cae42391..51699e68 100644 --- a/src/main/java/com/gamingmesh/jobs/config/BossBarManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/BossBarManager.java @@ -113,7 +113,22 @@ public class BossBarManager { break; } } - bar = Bukkit.createBossBar(message, color, BarStyle.SEGMENTED_20); + BarStyle style = BarStyle.SOLID; + switch(Jobs.getGCManager().SegementCount) { + case 6: + style = BarStyle.SEGMENTED_6; + break; + case 10: + style = BarStyle.SEGMENTED_10; + break; + case 12: + style = BarStyle.SEGMENTED_12; + break; + case 20: + style = BarStyle.SEGMENTED_20; + break; + } + bar = Bukkit.createBossBar(message, color, style); } else bar.setTitle(message); diff --git a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java index 407e7e4f..656d7416 100644 --- a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java @@ -159,6 +159,7 @@ public class GeneralConfigManager { //BossBar public boolean BossBarEnabled; public boolean BossBarShowOnEachAction; + public int SegementCount; public int BossBarTimer; public boolean BossBarsMessageByDefault; @@ -936,6 +937,8 @@ public class GeneralConfigManager { c.addComment("BossBar.ShowOnEachAction", "If enabled boss bar will update after each action", "If disabled, BossBar will update only on each payment. This can save some server resources"); BossBarShowOnEachAction = c.get("BossBar.ShowOnEachAction", false); + c.addComment("BossBar.SegementCount", "Defines in how many parts bossabr will be split visually","Valid options: 1, 6, 10, 12, 20"); + SegementCount = c.get("BossBar.SegementCount", 1); c.addComment("BossBar.Timer", "How long in sec to show BossBar for player", "If you have disabled ShowOnEachAction, then keep this number higher than payment interval for better experience"); BossBarTimer = c.get("BossBar.Timer", economyBatchDelay + 1);