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);
|
||||
|
||||
checkDailyQuests(jPlayer, prog.getJob(), info);
|
||||
|
||||
|
||||
if (jobinfo == null)
|
||||
continue;
|
||||
|
||||
|
@ -119,7 +119,8 @@ public class BossBarManager {
|
||||
bar.setTitle(message);
|
||||
|
||||
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) {
|
||||
bar.addPlayer(player.getPlayer());
|
||||
|
@ -1363,6 +1363,7 @@ public class ConfigManager {
|
||||
log.warning("Job " + jobKey + " has an invalid " + actionType.getName() + " type property: " + key + "!");
|
||||
continue;
|
||||
}
|
||||
Jobs.consoleMsg("Recognized: " + myKey + " " + enchant);
|
||||
|
||||
type = enchant == null ? myKey : enchant.toString();
|
||||
} else if (actionType == ActionType.CUSTOMKILL || actionType == ActionType.COLLECT || actionType == ActionType.MMKILL
|
||||
|
Loading…
Reference in New Issue
Block a user