mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 02:22:12 +01:00
30e4583dbe
By: Initial Source <noreply+automated@papermc.io>
31 lines
1 KiB
Diff
31 lines
1 KiB
Diff
--- a/net/minecraft/server/bossevents/CustomBossEvent.java
|
|
+++ b/net/minecraft/server/bossevents/CustomBossEvent.java
|
|
@@ -18,6 +18,10 @@
|
|
import net.minecraft.server.level.ServerPlayer;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.world.BossEvent;
|
|
+// CraftBukkit start
|
|
+import org.bukkit.boss.KeyedBossBar;
|
|
+import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
|
|
+// CraftBukkit end
|
|
|
|
public class CustomBossEvent extends ServerBossEvent {
|
|
|
|
@@ -25,7 +29,17 @@
|
|
private final Set<UUID> players = Sets.newHashSet();
|
|
private int value;
|
|
private int max = 100;
|
|
+ // CraftBukkit start
|
|
+ private KeyedBossBar bossBar;
|
|
|
|
+ public KeyedBossBar getBukkitEntity() {
|
|
+ if (this.bossBar == null) {
|
|
+ this.bossBar = new CraftKeyedBossbar(this);
|
|
+ }
|
|
+ return this.bossBar;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public CustomBossEvent(ResourceLocation id, Component displayName) {
|
|
super(displayName, BossEvent.BossBarColor.WHITE, BossEvent.BossBarOverlay.PROGRESS);
|
|
this.id = id;
|