HologramLib | Leaderboards & Custom Holograms [1.19.4 - 1.21] ⚡ Java Library icon

HologramLib | Leaderboards & Custom Holograms [1.19.4 - 1.21] ⚡ Java Library -----

Packet-based text display library with animations, leaderboards, emojis, minimessage, and more!



[​IMG]
ʜɪs ɪs ʟɪʙʀʀʏ.
[​IMG]
FEATURES
  • Text animations
  • Minimessage support
  • Packet based
  • Per player holograms
  • Dynamic leaderboard creation
  • Advanced hologram customization
  • Attachmed holograms
  • Flexible rendering modes
This api only works on 1.19.4+
The holograms do not work for Bedrock players
Its 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
View documentation on GitHub
Gradle
Code (Text):
repositories {
  maven { url 'https://jitpack.io' }
}

dependencies {
  compileOnly 'com.github.max1mde:HologramLib:1.5.0.1'
}
Maven
Code (Text):
<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>
<dependency>
  <groupId>com.github.max1mde</groupId>
  <artifactId>HologramLib</artifactId>
  <version>1.5.0.1</version>
  <scope>provided</scope>
</dependency>
You need to add this line to your plugin.yml:
Code (YAML):
depend :
 - HologramLib



CODE EXAMPLES
Getting the instance
Code (Java):
private HologramManager hologramManager ;

@Override
public void onEnable ( ) {
    hologramManager = HologramLib. getManager ( ). orElse ( null ) ;
    if (hologramManager == null ) {
        getLogger ( ). severe ( "Failed to initialize HologramAPI manager." ) ;
        return ;
    }
}

Code (Java):
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 ) ;

Code (Java):
hologramManager. spawn (hologram, <location > ) ;
hologramManager. remove (hologram ) ;
Leaderboard creation
Code (Java):
Map < Integer, String > leaderboardData = new LinkedHashMap <> ( ) { {
    put ( 1, "PlayerOne:1000" ) ;
    put ( 2, "PlayerTwo:950" ) ;
    put ( 3, "PlayerThree:900" ) ;
} } ;

TextHologram leaderboard = hologramManager. generateLeaderboard (
    location,
    leaderboardData,
    HologramManager. LeaderboardOptions. builder ( )
        . title ( "Top Players" )
        . showEmptyPlaces ( true )
        . scale (1.2f )
        . maxDisplayEntries ( 10 )
        . suffix ( "kills" )
        . build ( )
) ;

You can find more information in on the in the GitHub readme


SUPPORT
Problems with the api?
Before you write a bad review ask for support on the discord server or open an issue on github
[​IMG]



[​IMG]


Do not use the review section below for suggestions/feature requests or support.
Resource Information
Author:
----------
Total Downloads: 748
First Release: Aug 3, 2023
Last Update: Today at 11:47 AM
Category: ---------------
All-Time Rating:
1 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings