Properly validate boss bar progress

By: 2008Choco <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot 2016-04-11 19:16:25 +10:00
parent 8e83dbabf9
commit 6eac1fc417

View file

@ -119,6 +119,7 @@ public class CraftBossBar implements BossBar {
@Override
public void setProgress(double progress) {
Preconditions.checkArgument(progress >= 0.0 && progress <= 1.0, "Progress must be between 0.0 and 1.0 (%s)", progress);
handle.setProgress((float) progress);
}