Remap CraftBukkit to Mojang+Yarn Mappings

By: Initial Source <noreply+automated@papermc.io>
This commit is contained in:
CraftBukkit/Spigot
2024-12-11 22:26:55 +01:00
parent a265d64138
commit 30e4583dbe
1780 changed files with 44628 additions and 41274 deletions

View File

@@ -0,0 +1,31 @@
--- 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;