From 6f0a06c0edd7b19279142ea5f0f6abb06fec42eb Mon Sep 17 00:00:00 2001 From: Zrips Date: Fri, 12 May 2017 14:56:35 +0300 Subject: [PATCH] Don't show bossbar for block timer if disabled --- com/gamingmesh/jobs/config/BlockProtectionManager.java | 7 ++++--- jobConfig.yml | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/com/gamingmesh/jobs/config/BlockProtectionManager.java b/com/gamingmesh/jobs/config/BlockProtectionManager.java index 73d221f0..0df49263 100644 --- a/com/gamingmesh/jobs/config/BlockProtectionManager.java +++ b/com/gamingmesh/jobs/config/BlockProtectionManager.java @@ -186,9 +186,10 @@ public class BlockProtectionManager { return false; } - int sec = Math.round((((BlockTime + time * 1000) - currentTime)) / 1000); - - Jobs.getActionBar().send(player, Jobs.getLanguage().getMessage("message.blocktimer", "[time]", sec)); + if (Jobs.getGCManager().BossBarShowOnEachAction) { + int sec = Math.round((((BlockTime + time * 1000) - currentTime)) / 1000); + Jobs.getActionBar().send(player, Jobs.getLanguage().getMessage("message.blocktimer", "[time]", sec)); + } return true; } diff --git a/jobConfig.yml b/jobConfig.yml index 7113eb50..92a599ec 100644 --- a/jobConfig.yml +++ b/jobConfig.yml @@ -370,9 +370,9 @@ Jobs: value: true # Permission granted when reaching level 10 level: 10 - # Permissions granted when perticular conditions are meet + # Permissions granted when particular conditions are meet conditions: - # Condition mane, irelevent, you can write anything in here + # Condition name, irrelevant, you can write anything in here first: requires: # j marks that player should have particular jobs level and higher