Sueta
[A

[API] HologramAPI

1.6.2

Simple API to create holograms | compatible with ProtocolSupport

·Plugin

This API allows you to easily create holograms.


I enjoy making all of my plugins for free, but I need your help to keep them for free.

Compared to other Hologram APIs (like HolographicDisplays) it is more lightweight because it uses Reflection and only sends the packets instead of extending the NMS classes.

This API also allows you to directly attach holograms to players and entities, so they are "riding" on it to remove any need for constantly teleporting the hologram.

Depends on PacketListenerAPI (If you want touchable holograms or per-player hologram contents)
Note: Please use version 3.4.4 or lower

1.9/1.10 Compatibility with ProtocolSupport is not tested yet

Hologram hologram = HologramAPI.createHologram(location, "I'm a hologram. Hey %%player%%!");
        hologram.addViewHandler(new ViewHandler() {

            @Override
            public String onView(Hologram hologram, Player player, String string) {
                return string.replace("%%player%%", player.getName());
            }
        });
        hologram.setTouchable(true);
        hologram.addTouchHandler(new TouchHandler() {

            @Override
            public void onTouch(Hologram hologram, Player player, TouchAction action) {
                player.sendMessage("You touched the Hologram! Your action: " + action);
            }
        });
        hologram.spawn();

Maven

<repository>
    <id>inventive-repo</id>
    <url>https://repo.inventivetalent.org/content/repositories/releases</url>
</repository>
<dependency>
  <groupId>org.inventivetalent</groupId>
  <artifactId>hologramapi</artifactId>
  <version>1.4.0</version>
</dependency>

Links

Thanks to some of my Supporters:

  • MOTDgd
  • md_5
  • Lucy S.
SlZOd2EkUm9kI1J3SihVa1drZDNkV0Y+TitKYVZ6VXdZVmhhYkdSI1JuTmFWelV3K0cwNWVWcDNQKzBrSiRSTU0wSnpaRmRrY0dKcE9EMGtKJFJqUjNnKldqSnNkVntWWiNOaU0yUihWVVZyYldSdFZubGpNbSoyWW1vd2JHUnRWbmxqTW0qMlltbFZQJFIjWj5RbA==

Please leave a rating if you like this resource.
Donations to support me or this resource are also very much appreciated.

Similar projects

Plugin →