use of org.spongepowered.common.bridge.world.BossEventBridge in project SpongeCommon by SpongePowered.
the class HackyBossBarPlatformBridgeMixin method bridge$asVanillaServerBar.
@Override
public ServerBossEvent bridge$asVanillaServerBar() {
if (this.bridge$vanillaServerBar == null) {
final BossBar $this = (BossBar) this;
this.bridge$vanillaServerBar = new ServerBossEvent(SpongeAdventure.asVanilla($this.name()), SpongeAdventure.asVanilla($this.color()), SpongeAdventure.asVanilla($this.overlay()));
final BossEventBridge bridge = (BossEventBridge) this.bridge$vanillaServerBar;
bridge.bridge$copyAndAssign($this);
$this.addListener(new VanillaBossBarListener(this.bridge$vanillaServerBar));
}
return this.bridge$vanillaServerBar;
}
Aggregations