All Mods Resource Packs Data Packs Shaders Modpacks Plugins
HologramLib | Leaderboards & Custom Holograms

HologramLib | Leaderboards & Custom Holograms

by maximjsx • Downloads: 21 • Followers: 0
Description
Gallery
Changelog
Versions

FOLIA ✅ PAPER ✅ PURPUR ✅ 1.19.4 - 1.21.5 ✅

Version Version jitpack HologramLib

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

More info https://maximjsx.com/projects/hologramlib

How to Install HologramLib | Leaderboards & Custom Holograms (Plugin)

HologramLib | Leaderboards & Custom Holograms by maximjsx is verified for Bukkit, Folia, Paper, Purpur, Spigot across Minecraft versions 1.19, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5 (latest release: 1.8.3, file size: 1.4 MB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.19, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5) and platform (Bukkit, Folia, Paper, Purpur, Spigot).
  2. Make sure you have the compatible loader or environment installed for Bukkit, Folia, Paper, Purpur, Spigot.
  3. Move the downloaded HologramLib | Leaderboards & Custom Holograms file into your Minecraft .minecraft/plugins folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 12
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 6
1.21.x 1.20.x 1.19.4
Bukkit Paper Purpur Spigot
2mo ago 4
1.21.x 1.20.x 1.19.4
Folia Paper Purpur Spigot
2mo ago 3
1.21.x 1.20.x 1.19.4
Bukkit Paper Purpur Spigot
2mo ago 2
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 2
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 2
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Folia Paper Purpur
2mo ago 1
1.21.x 1.20.x 1.19.4
Bukkit Paper Purpur Spigot
2mo ago 1
1.21.x 1.20.x 1.19.4
Bukkit Paper Purpur Spigot
2mo ago 1
1.21.x 1.20.x 1.19.x
Bukkit Paper Purpur Spigot
2mo ago 1
1.21.x 1.20.x 1.19.4
Bukkit Paper Purpur Spigot
2mo ago 1
1.20.x 1.19.4
Bukkit Paper Purpur Spigot
2mo ago 1
1.20.x 1.19.4
Bukkit Paper Purpur Spigot
2mo ago 1
## What's Changed
  • Bump depdendency versions
  • Bug fixes


Skipped releases on Modrinth:

  • 1.8.2
Better number formatting in leaderboards by @RootException in #41
  • 1.8.1
Dependency updates
Updated version of FoliaLib
Updated version of packetevents
Updated version of EntityLib
# The Leaderboard Update

## What's Changed

### 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

# Changes

  • Added support for NOT_ATTACHED_PLAYER render mode that excludes attached players from viewing the hologram
  • Added Hologram#attachToPlayer(Player)


Also included 1.7.5:

## What's Changed

  • Improved performance (thanks to @RootException)
  • Fixed alot of bugs


## New Contributors

## What's Changed

  • Add back Hologram#getViewers() and also an additional method Hologram#getViewerUUIDs() which is more efficient and just returns the viewers as UUID's

## What's Changed


## API Breaking Changes
  • Replaced Hologram#nearbyEntityScanningDistance with Hologram#maxPlayerRenderDistanceSquared (Default value is now 62500)

## What's Changed


Dependency:
``
com.github.max1mde:HologramLib:1.6.9
``


## What's Changed

  • Replaced distance check with distanceSquared in Hologram.java

New methods in HologramManager
  • hologramExists(id)
  • hologramExists(hologram)
  • getHologramIds()

``
com.github.max1mde:HologramLib:1.6.8
``

## What's Changed

  • fix: Rendering issues



## What's Changed

  • Fixed render mode VIEWER_LIST issues

## What's Changed

  • Fix: left & right rotation in transformation not being applied

## What's Changed
  • Renamed interpolationDurationRotation to teleport duration in Hologram
  • Some smaller fixes & documentation updates

## What's Changed

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+)


## 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

HologramLib | Leaderboards & Custom Holograms Icon
Download HologramLib | Leaderboards & Custom Holograms
Select game version
Select platform