Spigot [API] HologramAPI 1.6.2

Simple API to create holograms | compatible with ProtocolSupport

  1. Is there multiple line support aswell as color codes? And when setting a hologram can I possibly get the config ---> int ---> To a string like deaths and would it display it? Sorry I'm on my phone atm and would have tested before asking
  2. Multi-line support will probably added in the next version.
    It of course supports the default minecraft colors.
    I'm not sure what you mean with your last question.
  3. clip


    I am testing now :p

    Also possibility of adding a method to clear all TouchHandlers from a hologram without needing a reference?

    Multi line support shouldn't be necessary :p It was very easy to implement. Any developer using this API should know how to add it themselves (saves you the work of implementing it)
  4. The last question is in my plugin there are players deaths, kills, and joins. Could I get that int from the config to show in the hologram?
  5. clip


    Yes it is possible.

    @inventivetalent, tested and it works!

    One last thing to bug about:

    I do notice that it has very hard to get it to refresh so the placeholders update in the hologram. Anyway you could implement some type of method, or even interval that it would resend the packets to allow a refresh of placeholders? This would allow the hologram placeholder values to be updated even when in view. Even a config option on your end would be nice to set the refresh time. As of right now, once I get my hologram text, the value seems to never change, even when I relog or leave the visible chunks where the holograms are :(

    Players are seeing unique values though so I am very happy about that!
  6. Thanks :)
    Edit: How would I implement extra lines, sorry I'm not a super advanced developer like you but I'm not your wannabe dev also. If don't want to share it it's fine with me thanks anyway though
  7. I'll add an update method to the Hologram class. (You can force an update by just calling setText).
  8. Just create multiple holograms on different heights.
  9. Correct me if I'm wrong, but sending the packets, using reflection (slower that normal code, btw), as if the hologram was there, isn't just more expensive rather than actually spawning the entity?
    Basically you're handling packets, chunk loads, players getting near, etc... when spawning an entity would let NMS handle everything for you, and more efficiently (you can stop the tick of these entities)

    (last time I claimed that my plugin was faster than packets, I had to prove it: http://bukkit.org/threads/holograph...nage-holograms-power-ups.269886/#post-2509412 I'm just asking the same from you :))
  10. xD I may wait till it gets implemented possibly
  11. I am not saying that packets are faster. I am aware that letting NMS handle everything is more efficient. I just don't like to create plugins that use NMS imports and I preferably use Reflection to keep it more compact.
  12. clip


    @inventivetalent I seem to have a problem where players don't see the holograms on join if the holograms are already spawned.

    Testing with 10 holograms that update every 20 ticks.
  13. clip


    Well @filoghost here are the timings of 11 holograms updating every 20 ticks which have minecraft statistic (seconds played, ticks played, minutes played) placeholders in them:


    only 2 players online though as its just a test server.
  14. There are the addLineBelow and addLineAbove methods.
  15. 7.05 17:48:07 [Server] WARN java.lang.NoSuchMethodException: net.minecraft.server.v1_7_R4.PacketPlayOutEntityTeleport.<init>(int, int, int, int, byte, byte, boolean, boolean)
    Spigot 1649