aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/server/bossevents/BossBattleCustom.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/server/bossevents/BossBattleCustom.patch')
-rw-r--r--patch-remap/og/net/minecraft/server/bossevents/BossBattleCustom.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/server/bossevents/BossBattleCustom.patch b/patch-remap/og/net/minecraft/server/bossevents/BossBattleCustom.patch
new file mode 100644
index 0000000000..896ccb39ea
--- /dev/null
+++ b/patch-remap/og/net/minecraft/server/bossevents/BossBattleCustom.patch
@@ -0,0 +1,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);