Skip to content

Asynchronous, high-performance Minecraft Hologram library for 1.8-1.19 servers.

License

Notifications You must be signed in to change notification settings

scraft-official/Hologram-Lib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hologram-Lib


Asynchronous, high-performance Minecraft Hologram library for 1.8-1.19 servers.

Requirements

This library can only be used on spigot servers higher or on version 1.8.8. The plugin ProtocolLib is required on your server.

How to use

Add the repository and dependency to your plugin: Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.unldenis</groupId>
    <artifactId>Hologram-Lib</artifactId>
    <version>2.0.0</version>
</dependency>

Gradle

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.unldenis:Hologram-Lib:master-SNAPSHOT'
}

Add ProtocolLib as dependency to your plugin.yml. It could look like this:

name: Hub
version: 1.0-SNAPSHOT
api-version: "1.13"
depend: [ProtocolLib]
author: unldenis

Line solutions in HologramLib

Animation Hologram Integration Clickable
Line
TextLine ✅(w/ Pool)
TextALine
ClickableTextLine
ItemLine
ItemALine

These are the lines provided by the library, thanks to the composition of various parts. The library is structured so that you too can create your own custom hologram.

To be integrated into a Hologram composed of multiple lines you need to implement ILine.

Support

The libraries that integrate Hologram-Lib

Example usage

  public Hologram firstExample(Location loc) {
    // create new line structure (armorstand)
    Line line = new Line(plugin);
    // compose an TextLine hologram
    TextLine textLine = new TextLine(line, "Hello", placeholders, true);

    // create new line structure (armorstand)
    Line line2 = new Line(plugin);
    // compose this second TextLine hologram
    TextLine textLine2 = new TextLine(line2, "%%player%%", placeholders, true);

    // append to hologram that will make all the hard work for you
    // the TextSequentialLoader loader will load lines(text only) one after the other. It is an experimental function.
    Hologram hologram = new Hologram(plugin, loc, new TextSequentialLoader());
    // remember to call this method or hologram will not be visible
    hologram.load(textLine, textLine2);

    // add hologram to pool
    pool.takeCareOf(hologram);

    return hologram;
    }

Click here if you want to see the full guided example.

Preview

20220102-213927_Trim.mp4

Placeholder Preview

2022-01-03_22 11 34

Interact Preview

2022-06-12_18 39 23

About

Asynchronous, high-performance Minecraft Hologram library for 1.8-1.19 servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%