us.myles.ViaVersion.api.boss.BossStyle Java Examples
The following examples show how to use
us.myles.ViaVersion.api.boss.BossStyle.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ViaBossBarFactory.java From helper with MIT License | 6 votes |
private static BossBarStyle convertStyle(BossStyle style) { switch (style) { case SOLID: return BossBarStyle.SOLID; case SEGMENTED_6: return BossBarStyle.SEGMENTED_6; case SEGMENTED_10: return BossBarStyle.SEGMENTED_10; case SEGMENTED_12: return BossBarStyle.SEGMENTED_12; case SEGMENTED_20: return BossBarStyle.SEGMENTED_20; default: return BossBarStyle.defaultStyle(); } }
Example #2
Source File: ViaBossBarFactory.java From helper with MIT License | 6 votes |
private static BossStyle convertStyle(BossBarStyle style) { switch (style) { case SOLID: return BossStyle.SOLID; case SEGMENTED_6: return BossStyle.SEGMENTED_6; case SEGMENTED_10: return BossStyle.SEGMENTED_10; case SEGMENTED_12: return BossStyle.SEGMENTED_12; case SEGMENTED_20: return BossStyle.SEGMENTED_20; default: return convertStyle(BossBarStyle.defaultStyle()); } }
Example #3
Source File: CommonBoss.java From ViaVersion with MIT License | 5 votes |
@Override public BossBar setStyle(BossStyle style) { Preconditions.checkNotNull(style); this.style = style; sendPacket(CommonBoss.UpdateAction.UPDATE_STYLE); return this; }
Example #4
Source File: CommonBoss.java From ViaVersion with MIT License | 5 votes |
public CommonBoss(String title, float health, BossColor color, BossStyle style) { Preconditions.checkNotNull(title, "Title cannot be null"); Preconditions.checkArgument((health >= 0 && health <= 1), "Health must be between 0 and 1"); this.uuid = UUID.randomUUID(); this.title = title; this.health = health; this.color = color == null ? BossColor.PURPLE : color; this.style = style == null ? BossStyle.SOLID : style; this.connections = Collections.newSetFromMap(new WeakHashMap<>()); this.flags = new HashSet<>(); visible = true; }
Example #5
Source File: BungeeBossBar.java From ViaVersion with MIT License | 4 votes |
public BungeeBossBar(String title, float health, BossColor color, BossStyle style) { super(title, health, color, style); }
Example #6
Source File: CommonBoss.java From ViaVersion with MIT License | 4 votes |
@Override public BossStyle getStyle() { return style; }
Example #7
Source File: VelocityViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar createBossBar(String title, float health, BossColor color, BossStyle style) { return new VelocityBossBar(title, health, color, style); }
Example #8
Source File: VelocityViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar createBossBar(String title, BossColor color, BossStyle style) { return new VelocityBossBar(title, 1F, color, style); }
Example #9
Source File: VelocityBossBar.java From ViaVersion with MIT License | 4 votes |
public VelocityBossBar(String title, float health, BossColor color, BossStyle style) { super(title, health, color, style); }
Example #10
Source File: SpongeViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar createBossBar(String title, float health, BossColor color, BossStyle style) { return new SpongeBossBar(title, health, color, style); }
Example #11
Source File: SpongeViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar createBossBar(String title, BossColor color, BossStyle style) { return new SpongeBossBar(title, 1F, color, style); }
Example #12
Source File: SpongeBossBar.java From ViaVersion with MIT License | 4 votes |
public SpongeBossBar(String title, float health, BossColor color, BossStyle style) { super(title, health, color, style); }
Example #13
Source File: VRViaAPI.java From ViaFabric with MIT License | 4 votes |
@Override public BossBar<Void> createBossBar(String s, BossColor bossColor, BossStyle bossStyle) { return new VRBossBar(s, 1f, bossColor, bossStyle); }
Example #14
Source File: BungeeViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar createBossBar(String title, float health, BossColor color, BossStyle style) { return new BungeeBossBar(title, health, color, style); }
Example #15
Source File: BungeeViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar createBossBar(String title, BossColor color, BossStyle style) { return new BungeeBossBar(title, 1F, color, style); }
Example #16
Source File: ViaBossBar.java From ViaVersion with MIT License | 4 votes |
public ViaBossBar(String title, float health, BossColor color, BossStyle style) { super(title, health, color, style); }
Example #17
Source File: BukkitViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar<Player> createBossBar(String title, float health, BossColor color, BossStyle style) { return new ViaBossBar(title, health, color, style); }
Example #18
Source File: BukkitViaAPI.java From ViaVersion with MIT License | 4 votes |
@Override public BossBar<Player> createBossBar(String title, BossColor color, BossStyle style) { return new ViaBossBar(title, 1F, color, style); }
Example #19
Source File: WitherBossBar.java From ViaRewind with MIT License | 4 votes |
@Override public BossBar setStyle(BossStyle bossStyle) { throw new UnsupportedOperationException(this.getClass().getName() + " does not support styles"); }
Example #20
Source File: WitherBossBar.java From ViaRewind with MIT License | 4 votes |
@Override public BossStyle getStyle() { return null; }
Example #21
Source File: VRBossBar.java From ViaFabric with MIT License | 4 votes |
public VRBossBar(String title, float health, BossColor color, BossStyle style) { super(title, health, color, style); }
Example #22
Source File: VRViaAPI.java From ViaFabric with MIT License | 4 votes |
@Override public BossBar<Void> createBossBar(String s, float v, BossColor bossColor, BossStyle bossStyle) { return new VRBossBar(s, v, bossColor, bossStyle); }
Example #23
Source File: ViaAPI.java From ViaVersion with MIT License | 2 votes |
/** * Create a new bossbar instance * * @param title The title * @param color The color * @param style The style * @return BossBar instance */ BossBar createBossBar(String title, BossColor color, BossStyle style);
Example #24
Source File: ViaAPI.java From ViaVersion with MIT License | 2 votes |
/** * Create a new bossbar instance * * @param title The title * @param health Number between 0 and 1 * @param color The color * @param style The style * @return BossBar instance */ BossBar createBossBar(String title, float health, BossColor color, BossStyle style);