aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/server/bossevents/BossBattleCustom.patch
blob: 896ccb39ea2c30925526c78ffaac6507577352f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- a/net/minecraft/server/bossevents/BossBattleCustom.java
+++ b/net/minecraft/server/bossevents/BossBattleCustom.java
@@ -18,12 +18,27 @@
 import net.minecraft.util.MathHelper;
 import net.minecraft.world.BossBattle;
 
+// CraftBukkit start
+import org.bukkit.boss.KeyedBossBar;
+import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
+// CraftBukkit end
+
 public class BossBattleCustom extends BossBattleServer {
 
     private final MinecraftKey id;
     private final Set<UUID> players = Sets.newHashSet();
     private int value;
     private int max = 100;
+    // CraftBukkit start
+    private KeyedBossBar bossBar;
+
+    public KeyedBossBar getBukkitEntity() {
+        if (bossBar == null) {
+            bossBar = new CraftKeyedBossbar(this);
+        }
+        return bossBar;
+    }
+    // CraftBukkit end
 
     public BossBattleCustom(MinecraftKey minecraftkey, IChatBaseComponent ichatbasecomponent) {
         super(ichatbasecomponent, BossBattle.BarColor.WHITE, BossBattle.BarStyle.PROGRESS);