1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-30 12:01:22 +01:00

fail safe for bossbar on older versions

This commit is contained in:
Zrips 2016-03-30 16:45:53 +03:00
parent 5847619458
commit ef03c9ac0e

View File

@ -26,6 +26,9 @@ public class BossBarManager {
}
public synchronized void ShowJobProgression(final JobsPlayer player) {
if (Jobs.getActionBar().getVersion() < 1900)
return;
if (player == null)
return;
for (String one : player.getUpdateBossBarFor()) {
@ -38,7 +41,8 @@ public class BossBarManager {
}
public synchronized void ShowJobProgression(final JobsPlayer player, final JobProgression jobProg) {
if (Jobs.getActionBar().getVersion() < 1900)
return;
String playername = player.getUserName();
if (!Jobs.getBossBarToggleList().containsKey(playername) && Jobs.getGCManager().BossBarsMessageByDefault)
Jobs.getBossBarToggleList().put(playername, true);