From 767f028054b0fa7aaa063e2c0c2600b9556bdaff Mon Sep 17 00:00:00 2001 From: 2008Choco Date: Mon, 11 Apr 2016 19:16:25 +1000 Subject: [PATCH] Properly validate boss bar progress --- src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java index 6e6a5e3400..70b6ad51f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java @@ -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); }