Skip to content

Messages, boss bars, holograms ​

Services from EranoServices, picked for the running server when EranoAPI enables. Check isSupported() where it matters; an unsupported service does nothing.

Action bar and titles ​

java
MessageService messages = EranoServices.messages();
messages.sendActionBar(player, "§aKit selected");
messages.sendTitle(player, "§cDeathmatch", "§7Last one standing wins", 10, 40, 10);

Packets on 1.8 - 1.10, the Bukkit API after.

Boss bars ​

java
GameBar bar = EranoServices.bossBars().create("Starting in 30s", "YELLOW");
bar.addPlayer(player);
bar.setProgress(0.5);
bar.setTitle("Starting in 15s");
bar.removeAll();

Bukkit's BossBar on 1.9+. On 1.8 a client-side wither shows the bar: no colors (isLegacy() is true).

Holograms ​

java
Hologram hologram = EranoServices.holograms().show(location, Arrays.asList("§cBreeze", "§712/24 players"), viewers);
hologram.setLines(Arrays.asList("§cBreeze", "§713/24 players"));
hologram.addViewer(player);
hologram.remove();

Each viewer sees their own; nothing is saved to the world. Packets on 1.8 - 1.12, entities hidden from other players on 1.13+ (TextDisplay from 1.19.4).

SurvivalGames is a paid plugin. EranoAPI is open source under the MIT license.