Holograms

Holograms 3.2.0

Compatible API Versions
1.0.0
Sourcecode
https://github.com/Creeperface01/Holograms
upload_2018-2-5_16-29-21.png


Usage
First you have to create a new hologram instance by /hologram <hologram ID> (you cannot use "edit" or "update" as hologram ID)

if you want to edit/remove a hologram later use command /hologram edit - it will open a configuration UI where you can change its position, text etc. (This command automatically selects the nearest hologram to you.)

(For colors you can use '&' instead of '§')

Creating a new hologram

a) General tab
In general tab you can change the position of the hologram, autoupdate or remove it.

There you can set exact hologram position

In "move" part you can offset the hologram

And on the bottom you can remove hologram instance or change autoupdate interval (values lower than 0 means not update), autoupdate is good for example if you want to display current time.

b) Text Settings
In "text settings" you can change/add new lines and translations

Text field (separated to translations and lines)

Here you can add new lines or translations (or remove with negative value)

c) Grids

Since version 3.0 holograms support grids. To display hologram as a grid enable this in grid settings

Snímek obrazovky 2019-05-19 v 13.42.56.png

1. Manual creation
You can make grids by writing the lines directly in the text window like that

Snímek obrazovky 2019-05-19 v 14.14.38.png


which will be shown like

Snímek obrazovky 2019-05-19 v 14.16.08.png

2. Grid source
For grids like leaderboards or some live statistics I recommend using grid source.
Grid source is in other words data provider for the grid. By default Holograms provide only MySQL grid source, but in the future I'll add more sources. Also new grid sources can be added by plugins.

Usage:
To use the grid source you must configure new grid in grids.yml configuration file.

Example:
Code:
grids:
  mysqlgrid: #name of the grid
    source: mysql #source type
    offset: 0 #data row offset in the grid source
    limit: 10 #maximal count of rows loaded/displayed
    refresh: 10 #the minimal interval in seconds when source will reload the data
    data: #data for the specific grid source (mysql in this case)
      columns: ["column1", "column3"] #can be omitted or left empty to select all the columns
      table: gridtable #table or view to get data from
Then in game in the grid settings fill grid source with the name of the configured grid in this case it's mysqlgrid

Snímek obrazovky 2019-05-19 v 13.50.26.png


Normalize data - normalize the result of grid source for example result like "Tĥïŝ ĩš â fůňķŷ Šťŕĭńġ" will be changed to "This is a funky String"

Space between columns - defines the minimal spacing between two columns, 4 = 1 space character

Add grid header - in case of MySQL, that will show the name of mysql column above every grid column.

Column templates
Currently holograms contain some basic in-game customization of how data should be displayed, one of them is column template which you can set in grid settings. Using column templates you can change format of column or add a text before or after the column. Another customizations can be made on the mysql side by creating a view which I also recommend to use for displaying top statistics or any other form of showing the results.

In future updates I plan to add more ways to customize the source output and some other UI changes in general.

Snímek obrazovky 2019-05-19 v 13.50.26.png

Configuration:

Code:
#distance between separate lines
lines_gaps: 0.3

#if hologram packets should be compressed asynchronously
async_batch: false

#how often should be holograms saved to config (in minutes)
save_interval: 5
Basic video tutorial: (for older version)

Premissions
hologram.use - permission to use /hologram command

Translations
Holograms also provides basic support for multi languaged holograms which means every player can see different text. However this feature is dependent on another plugin/library which tells hologram what language player uses. There is not any public language plugin as I know so if you are a developer you can use simple API to get translations working

Placeholders
You can use placeholders in holograms to show some actual information on hologram. To enable this, install PlaceholderAPI plugin which provides that

Plugin API
Whole documented API can be found here

basic usage
PHP:
HologramAPI api = HologramAPI.getInstance(); //to get API instance
in HologramAPI are methods to
- get Hologram instance
- register new grids or grid sources
Author
CreeperFace
Downloads
8,563
Views
8,563
First release
Last update
Rating
4.31 star(s) 13 ratings

More resources from CreeperFace

  • ScoreboardAPl
    ScoreboardAPl
    Simple API for fake scoreboards
  • WorldFixer
    WorldFixer
    Convert java edition worlds to bedrock easily
  • GAC
    GAC
    Cheat protection plugin originally created for GameTeam network
  • PlaceholderAPI
    PlaceholderAPI
    Simple placeholder provider
  • KotlinLib
    KotlinLib
    Base kotlin library for all kotlin plugins

Latest updates

  1. Version 3.2.0

    - fix placeholder parameters
  2. Version 3.1.3

    - fixes previous version
  3. Version 3.1.1

    - update to 1.12

Latest reviews

when i want to create an scoreboard like kills / top money / top factions api doesnt work, any help ?
CreeperFace
CreeperFace
Thanks, please post more detailed question in the resource discussion or nukkit discord
I have a probleme! When I add a line it just stays in the previous one. Am I doing something wrong?
CreeperFace
CreeperFace
Check your config file. There's an option for the gap between the lines
Great plugin, haven't had any issues with it. I would rate it 5 stars if the API were more robust and/or documented.
Very Nice Plugin and works fine / Funktioniert und macht was es soll !
CreeperFace
CreeperFace
thank you :)
Please add the ability for the plugin to save positions for each floating text and have it re-create the entities in their exact positions if the server restarts or reloads. Because if I backup and restore my server the floating texts are gone and it makes it hard for me to fix them.
Wirklich klasse Plugin :)
Allerdings funktioniert die Formatierung für Tabellen nicht mehr :(
Könntet hr das wieder hinzufügen? Ansonsten müsste ich ein Hologram bei mir komplett neu machen. Das sieht nun etwas doof aus ^^#

-------------------------------------------------------------------


Really great plugin :)
However, the formatting for tables no longer works :(
Would you like to add that again? Otherwise I would have to make a hologram completely new with me. This looks a little stupid ^^ #
CreeperFace
CreeperFace
Thank you :) for any issues contact me on discord
Another Great update! Thank you for making Holograms simple in Nukkit
CreeperFace
CreeperFace
Thank you :)
Thanks so much for the update, working perfectly!
Amazing Plugin!
A Long time i have wanted a way to do this easy as have many other people and now its easier than i ever taught possible! Differently Recommend this to everyone! so useful and user friendly
I like it, But I was hope if we can really add blocks icons, Like this plugin icon!.
CreeperFace
CreeperFace
Thank you, but I don't know what you mean.
Top