mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 12:15:53 +01:00
Ensure boss bar progress between 0 and 1
This commit is contained in:
parent
5bc6b07f4a
commit
c31624fba3
@ -147,7 +147,7 @@ public class BossBarTrait extends Trait {
|
|||||||
if (number >= 1 && number <= 100) {
|
if (number >= 1 && number <= 100) {
|
||||||
number /= 100.0;
|
number /= 100.0;
|
||||||
}
|
}
|
||||||
bar.setProgress(number);
|
bar.setProgress(Math.min(0, Math.max(1, number)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bar.setTitle(title);
|
bar.setTitle(title);
|
||||||
|
Loading…
Reference in New Issue
Block a user