mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-20 07:01:22 +01:00
Limiting BoassBar progress to a valid range only
This commit is contained in:
parent
99d88a59f0
commit
3e50e3ae5b
@ -949,7 +949,7 @@ public class Jobs extends JavaPlugin {
|
|||||||
JobInfo jobinfo = prog.getJob().getJobInfo(info, level);
|
JobInfo jobinfo = prog.getJob().getJobInfo(info, level);
|
||||||
|
|
||||||
checkDailyQuests(jPlayer, prog.getJob(), info);
|
checkDailyQuests(jPlayer, prog.getJob(), info);
|
||||||
|
|
||||||
if (jobinfo == null)
|
if (jobinfo == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -119,7 +119,8 @@ public class BossBarManager {
|
|||||||
bar.setTitle(message);
|
bar.setTitle(message);
|
||||||
|
|
||||||
double percentage = jobProg.getExperience() / jobProg.getMaxExperience();
|
double percentage = jobProg.getExperience() / jobProg.getMaxExperience();
|
||||||
bar.setProgress(percentage > 1.0 ? 1.0 : percentage);
|
percentage = percentage > 1D ? 1D : percentage < 0 ? 0 : percentage;
|
||||||
|
bar.setProgress(percentage);
|
||||||
|
|
||||||
if (OldOne == null) {
|
if (OldOne == null) {
|
||||||
bar.addPlayer(player.getPlayer());
|
bar.addPlayer(player.getPlayer());
|
||||||
|
@ -1363,6 +1363,7 @@ public class ConfigManager {
|
|||||||
log.warning("Job " + jobKey + " has an invalid " + actionType.getName() + " type property: " + key + "!");
|
log.warning("Job " + jobKey + " has an invalid " + actionType.getName() + " type property: " + key + "!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Jobs.consoleMsg("Recognized: " + myKey + " " + enchant);
|
||||||
|
|
||||||
type = enchant == null ? myKey : enchant.toString();
|
type = enchant == null ? myKey : enchant.toString();
|
||||||
} else if (actionType == ActionType.CUSTOMKILL || actionType == ActionType.COLLECT || actionType == ActionType.MMKILL
|
} else if (actionType == ActionType.CUSTOMKILL || actionType == ActionType.COLLECT || actionType == ActionType.MMKILL
|
||||||
|
Loading…
Reference in New Issue
Block a user