Skip to content

Commit 14f3e3f

Browse files
MrHell228Faithcaio
authored andcommitted
fix EnderDragon#bossBar()
1 parent 8a00331 commit 14f3e3f

File tree

1 file changed

+4
-2
lines changed
  • src/main/java/org/spongepowered/api/entity/living/monster/boss

1 file changed

+4
-2
lines changed

src/main/java/org/spongepowered/api/entity/living/monster/boss/Boss.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import org.spongepowered.api.data.value.Value;
3030
import org.spongepowered.api.entity.Entity;
3131

32+
import java.util.Optional;
33+
3234
/**
3335
* Represents a boss monster that may cause a boss health bar to show
3436
* on client interfaces.
@@ -40,7 +42,7 @@ public interface Boss extends Entity {
4042
*
4143
* @return The boss bar
4244
*/
43-
default Value<BossBar> bossBar() {
44-
return this.requireValue(Keys.BOSS_BAR);
45+
default Optional<Value<BossBar>> bossBar() {
46+
return this.getValue(Keys.BOSS_BAR);
4547
}
4648
}

0 commit comments

Comments
 (0)