mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Remap CraftBukkit to Mojang+Yarn Mappings
By: Initial Source <noreply+automated@papermc.io>
This commit is contained in:
@@ -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;
|
Reference in New Issue
Block a user