FOLIA ✅ PAPER ✅ PURPUR ✅ 1.19.4 - 1.21.5 ✅
An easy-to-use, packet-based text/item/block display hologram API with MiniMessage and emoji support.
FEATURES
- Text, Block & Item Holograms
- Text animations
- Minimessage support
- Packet based
- Per player holograms
- Leaderboard generators
- Advanced hologram customization
- Attachment and parenting support
- Flexible rendering modes
DISCLAIMER
This API only works on 1.19.4+ The holograms do not work for Bedrock players There can be some issues when using spigot on older versions (Preferably use Paper or a fork of it) It's just a Java API. This plugin does not work standalone.SETUP
- Download the plugin .jar
- Download Packet Events
- Upload the .jar files onto your server (yourserver/plugins folder)
- Add the plugin as a dependency to your plugin and use it
PROJECT SETUP
Gradle installation
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly 'com.github.HologramLib:HologramLib:1.7.6'
}
Maven installation
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.HologramLib</groupId>
<artifactId>HologramLib</artifactId>
<version>1.7.6</version>
<scope>provided</scope>
</dependency>
Add this to your plugin
plugin.yml
depend:
- HologramLib
Code examples
Getting the instance
private HologramManager hologramManager;
@Override
public void onLoad() {
HologramLib.onLoad(this); /*Only needed if you shade HologramLib*/
}
@Override
public void onEnable() {
hologramManager = HologramLib.getManager().orElse(null);
if (hologramManager == null) {
getLogger().severe("Failed to initialize HologramLib manager.");
return;
}
}
Creating a hologram
TextHologram hologram = new TextHologram("unique_id")
.setMiniMessageText("<aqua>Hello world!")
.setSeeThroughBlocks(false)
.setBillboard(Display.Billboard.VERTICAL)
.setShadow(true)
.setScale(1.5F, 1.5F, 1.5F)
.setTextOpacity((byte) 200)
.setBackgroundColor(Color.fromARGB(60, 255, 236, 222).asARGB())
.setAlignment(TextDisplay.TextAlignment.CENTER)
.setViewRange(1.0)
.setMaxLineWidth(200);
Spawning and despawning
hologramManager.spawn(hologram, <location>);
hologramManager.remove(hologram);
Animations
TextAnimation animation = new TextAnimation()
.addFrame( "<red>First frame")
.addFrame("<green>Second frame")
.addFrame("Third frame\n" +
"Second line in third frame")
.addFrame("Last frame");
animation.setDelay(20L); // 1 second
animation.setDelay(20L * 2);
hologramManager.applyAnimation(this.hologram, animation);
Leaderboard
Map<Integer, String> leaderboardData = new LinkedHashMap<>() {{
put(1, "MaximDe:1000");
put(2, "dream:950");
put(3, "BastiGHG:500");
put(4, "Wichtiger:400");
// ... more entries
}};
LeaderboardHologram leaderboard = hologramManager.generateLeaderboard(
location,
leaderboardData,
LeaderboardHologram.LeaderboardOptions.builder()
.title("Top Players - Kills")
.showEmptyPlaces(true)
.scale(1.2f)
.maxDisplayEntries(10)
.suffix("kills")
.topPlayerHead(true)
.build()
);
Wiki
Code examples & more https://github.com/HologramLib/HologramLib/wiki
Example/Showcase Plugin
https://github.com/HologramLib/ExamplePlugin
All Versions
+ Add Version- Bump depdendency versions
- Bug fixes
Skipped releases on Modrinth:
- 1.8.2
- 1.8.1
Updated version of FoliaLib
Updated version of packetevents
Updated version of EntityLib
## What's Changed
- Add placeholder api support by @Fedox-die-Ente in https://github.com/HologramLib/HologramLib/pull/37
- Leaderboards and more by @maximjsx in https://github.com/HologramLib/HologramLib/pull/40
- Introduced interactive hologram entities **"InteractionBox"** that respond to player interactions.
- Added customizable, multi-page leaderboard holograms with player head support and flexible formatting.
- Added player head rendering and caching utilities with asynchronous skin and head retrieval.
### Breaking Changes in the API 🚨
## If you are already using HologramLib's leaderboards, you MUST update your plugin before updating HologramLib on your server ⚠️
Everything regarding **Leaderboards** is new including imports!
Here is a small example:
``
java
Map<UUID, LeaderboardHologram.PlayerScore> scores = new HashMap<>();
LeaderboardHologram.LeaderboardOptions pvpOptions = LeaderboardHologram.LeaderboardOptions.builder()
.title("PvP Champions")
.suffix("Kills")
.showEmptyPlaces(false)
.maxDisplayEntries(10)
.sortOrder(LeaderboardHologram.SortOrder.DESCENDING)
.headMode(LeaderboardHologram.HeadMode.RESOURCEPACK)
.leaderboardType(LeaderboardHologram.LeaderboardType.ALL_PLAYER_HEADS)
.build();
LeaderboardHologram pvpLeaderboard = new LeaderboardHologram(pvpOptions, "pvp_lb");
pvpLeaderboard.setAllScores(scores);
/* You can combine the leaderboard with others in a paginated leaderboard
but you can also just spawn the pvpLeaderboard for example
directly using hologramManager.spawn(pvpLeaderboard, location)
- /
PagedLeaderboard pagedLeaderboard = new PagedLeaderboard("paged_holo")
.addPage(pvpLeaderboard)
.addPage(<... another page>)
.setArrowBackgrounds(pvpLeaderboard.getBackgroundHologram().getBackgroundColor())
.setLeftArrowText("<red><<")
.setRightArrowText("<red>>>")
.setArrowOffset(3.5)
.setClickSounds(Sound.BLOCK_AMETHYST_CLUSTER_FALL, Sound.BLOCK_AMETHYST_CLUSTER_FALL)
.addPage(economyLeaderboard)
.rotate(0);
hologramManager.spawn(pagedLeaderboard, location);
``For the resourcepack option you also need the resourcepack zip file from below on your server.
<a href="https://github.com/HologramLib/HologramLib/releases/download/1.8.0/HologramLib.Resourcepack.zip">
<img width="160px" src="https://github.com/HologramLib/Addons/blob/main/download_rp.svg" alt="Download"/>
</a>
> [!NOTE]
> The wiki was partially updated already
<img width="500" alt="image" src="https://github.com/user-attachments/assets/2752cf34-0f2a-4b1a-b8ed-a50c41ad5974" />
## New Contributors
- @Fedox-die-Ente made their first contribution in https://github.com/HologramLib/HologramLib/pull/37
- Full Changelog**: https://github.com/HologramLib/HologramLib/compare/1.7.7...1.8.0
- Bugfixes
- Attachement issues
- Full Changelog**: https://github.com/HologramLib/HologramLib/compare/1.7.6...1.7.7
- Added support for NOT_ATTACHED_PLAYER render mode that excludes attached players from viewing the hologram
- Added Hologram#attachToPlayer(Player)
- Full Changelog**: https://github.com/HologramLib/HologramLib/compare/1.7.5...1.7.6
Also included 1.7.5:
- Adding attach and detach methods and setIsInvisible by @misieur in https://github.com/HologramLib/HologramLib/pull/34
- Adding a warning to the attach method in the Hologram class by @misieur in https://github.com/HologramLib/HologramLib/pull/35
- Bugfixes
- Full Changelog**: https://github.com/HologramLib/HologramLib/compare/1.7.4...1.7.5
- Improved performance (thanks to @RootException)
- Fixed alot of bugs
- Async Update Task by @RootException in https://github.com/HologramLib/HologramLib/pull/32
- Code Cleanup by @RootException in https://github.com/HologramLib/HologramLib/pull/33
## New Contributors
- @RootException made their first contribution in https://github.com/HologramLib/HologramLib/pull/32
- Full Changelog**: https://github.com/HologramLib/HologramLib/compare/1.7.3...1.7.4
- Add back
Hologram#getViewers()and also an additional methodHologram#getViewerUUIDs()which is more efficient and just returns the viewers as UUID's
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.7.0...1.7.1
- Fixed re-appearing issues for holograms
- Wrapper entity implementation (EntityLib) by @max1mde in https://github.com/max1mde/HologramLib/pull/26
## API Breaking Changes
- Replaced
Hologram#nearbyEntityScanningDistancewithHologram#maxPlayerRenderDistanceSquared(Default value is now 62500)
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.9...1.7.0
- Fixed: Hologram removal issue - https://github.com/max1mde/HologramLib/issues/23
- Using BukkitTask for support all platforms by @WhyZerVellasskx in https://github.com/max1mde/HologramLib/pull/24
Dependency:
``
com.github.max1mde:HologramLib:1.6.9
``- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.8...1.6.9
- Replaced
distancecheck withdistanceSquaredinHologram.java
New methods in HologramManager
hologramExists(id)hologramExists(hologram)getHologramIds()
``
com.github.max1mde:HologramLib:1.6.8
``- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.6...1.6.8
- fix: Rendering issues
- fix: teleport & addAllViewers in Hologram.java by @max1mde in https://github.com/max1mde/HologramLib/pull/21
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.4...1.6.6
- Fixed shading issues
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.2.1...1.6.3
- Fixed render mode
VIEWER_LISTissues
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.1...1.6.2.1
- Fix: left & right rotation in transformation not being applied
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.0...1.6.2
- Renamed interpolationDurationRotation to teleport duration in Hologram
- Some smaller fixes & documentation updates
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.6.0...1.6.1
Item & Block holograms can be spawned now through the HologramManager
A top player head can be enabled in the leaderboard hologram (Skin currently only applied on 1.20.5+)
- feat: item and block holograms by @max1mde in https://github.com/max1mde/HologramLib/pull/8
- add: folia support by @WhyZerVellasskx in https://github.com/max1mde/HologramLib/pull/12
- fix: initialize folialib by @WhyZerVellasskx in https://github.com/max1mde/HologramLib/pull/14
- fix: folialib bugs by @WhyZerVellasskx in https://github.com/max1mde/HologramLib/pull/15
## Issues solved
https://github.com/max1mde/HologramLib/issues/11
https://github.com/max1mde/HologramLib/issues/7
https://github.com/max1mde/HologramLib/issues/6
## New Contributors
- @WhyZerVellasskx made their first contribution in https://github.com/max1mde/HologramLib/pull/12
- Full Changelog**: https://github.com/max1mde/HologramLib/compare/1.5.3.2...1.6.0-ALPHA
All references to
HologramAPI have been renamed to HologramLib.### Please update your imports:
- From:
com.maximde.hologramapi - To:
com.maximde.hologramlib
### Update the main class:
- From:
com.maximde.hologramapi.HologramAPI - To:
com.maximde.hologramlib.HologramLib
- Full Changelog**: [1.4.8...1.5.0](https://github.com/max1mde/HologramLib/compare/1.4.8...1.5.0)
<sub>I swear this is the last time I make such breaking changes 🙏💀</sub>
- Copy hologram methods
HologramManager#copyHologram(TextHologram source)HologramManager#copyHologram(TextHologram source, String id)- More comments
- Full Changelog**: https://github.com/max1mde/HologramAPI/compare/1.4.7...1.4.8
- New hologram generation methods
<img src="https://github.com/user-attachments/assets/68b8ded4-c307-44e9-a746-6777ff9b6205" width="400">
- Hologram attachement (passenger) method
- Shading is now possible (In theory)
- Fixed rendering (Holograms respawn again when rejoining area / world / server)
- https://github.com/max1mde/HologramAPI/issues/2
- Improved internal instance management
- Downgrade from JDK 21 to JDK 17
- Downgrade to spigot 1.19.4
- Update packetevents & entitylib version
- Bug fixes & code improvements
- Text animations
- Minimessage support
- Packet based
- Per player holograms
- ItemsAdder emoji support
