2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/server/bossevents/BossBattleCustom.java
|
|
|
|
+++ b/net/minecraft/server/bossevents/BossBattleCustom.java
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -19,12 +19,27 @@
|
2021-03-15 23:00:00 +01:00
|
|
|
import net.minecraft.util.MathHelper;
|
|
|
|
import net.minecraft.world.BossBattle;
|
2018-11-10 10:22:39 +01:00
|
|
|
|
|
|
|
+// CraftBukkit start
|
|
|
|
+import org.bukkit.boss.KeyedBossBar;
|
|
|
|
+import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
|
|
|
|
+// CraftBukkit end
|
|
|
|
+
|
|
|
|
public class BossBattleCustom extends BossBattleServer {
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
private final MinecraftKey id;
|
|
|
|
private final Set<UUID> players = Sets.newHashSet();
|
|
|
|
private int value;
|
|
|
|
private int max = 100;
|
2018-11-10 10:22:39 +01:00
|
|
|
+ // 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);
|