HologramLib

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

HologramUtil

[insert nonexistant awesome logo ;3]

Brought to you by Castaway Labs

Table of contents

  1. What does it do
  2. Configuration
  3. Permissions
  4. Commands

What does it do?

The purpose of this plugin is very simple: creating holograms as seen in the video below. It is a plugin partially based on the MCEdit filter, and partly on our own code in an attempt to make this technique easily accessible for the Bukkit community, both developers and server owners. This plugin allows you to create these holograms on the fly, either by using integrated commands (for server owners) or by using the API (for developers). Holograms can be used to display images or text practically anywhere, readable from any angle. Annoyed by people not reading your signs? I am sure they won't miss the fancy.

Video by Asdjke

Features

  • Create and remove holograms with merely one command
  • Chatcolors and formats are supported, by using '&'
  • Don't worry about the mobs creating the tags, they will respawn even when killed. (Check the commands for removal)
  • Developer API to create holograms
  • [under development] Animations, effects, interaction (unconfirmed)
  • [under development] Clientside holograms

Dependencies

  • ProtocolLib

Configuration

None as of yet! We felt no need for a config so far, even though it generates to allow any further usage. It is only used as storage for now.

Permissions

'hologramlib.use' will allow you do create holograms txt files, images and via the command itself, list them, and remove them if necessary.

Commands

(Note: you can also use its alias '/hg')

  • /hologram createimage <id> <image.ext> [width height] - Creates a hologram from the specified image
  • /hologram createtext [-f] <id> [text] - Creates a hologram either from a file (with the -f flag) or using the text
  • /hologram remove <id> - Removes the hologram with the specified id
  • /hologram list [page] - Lists the ids of holograms (10 per page)

Additional info on the commands

  • the ids are unique, when you use it twice, only the last one will be there.
  • Images should be stored in /plugins/HologramLib/images
  • Text files should be stored in /plugins/HologramLib/text
  • Text files will be loaded by id, so /hologram createtext -f test will load test.txt
  • When using the command to input text, the following format is used: "line one","line 2"

Development section

The API is simple yet powerful enough, just the way it should be.

// First get the utility instance
HologramUtil util = HologramUtil.getInstance();

// Create a hologram
util.createLine("hologram ID", location, text);
// Or create multiple lines, nicely aligned (not shown, but text is a String[] ;))
util.createLines("hologram ID", location, text);

// Create a clientside hologram (not 100% working yet)
util.createClientLine(forWhom, "hologram ID", location, text);
// Of course, also support for multiple lines (again, in this case text is a String[])
util.createClientLines(forWhom, "hologram ID", location, text);

// Checks if the entity is part of a hologram
util.isHologramEntity(entity);

// Gets the ID of the hologram the entity is part of (empty String if none)
util.getByEntity(entity);

// Get all hologram IDs
util.getHologramIds();

// Get al UUIDs which are part of the hologram
util.getHologramUUIDs("hologram ID");

// Remove a hologram
util.removeHologram("hologram ID");

// get the holograms shown to a player (not yet functional)
util.getClientHolograms(player);

// get the entity IDs of a clientside hologram (useful for packets)
util.getClientHologramIds(player, "hologram ID");

This project is hosted on our Gitlab server


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Recent Files

No files uploaded yet.