Library Holographic Displays v2: an easy way to manage holograms (+ power ups)

Discussion in 'Resources' started by filoghost, May 19, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    filoghost

    Ultimate_n00b Uh, I don't know then. Is there a way to measure it? And some other things, are you sure that you can execute some methods async, and is the entity tracker processed on the main thread?
     
  2. Offline

    Ultimate_n00b

    Yeah, it's very easy to measure. As well, there are no entities; it's all packets. As for what's sync, it involves putting player objects in a hashmap containing their world every now and then. That's about it actually.
     
  3. Offline

    ThunderKing54

    @filoghost Can you or somebody else make this for 1.5.2 or don't work it because there is no horse entity ?
     
  4. Offline

    filoghost

    It wouldn't work, there are no horses or valid substitutes.

    I will add soon some tutorials about powerups and touch holograms.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  5. Offline

    97WaterPolo

    filoghost
    Hello! So currently I am using
    Code:
    Hologram h = HolographicDisplaysAPI.createIndividualHologram(plugin, new Location(Bukkit.getWorld("lobby"),-1,65,4), e.getPlayer(), image);
    to send a hologram to the player. image variable is String [], and is different per player. The only problem is, the hologram doesn't seem to be per player, I can see this hologram for other players, and visa versa. I am creating all the holograms on the same spot, but intending them to have it so only the player can see their own. Do I have a bad misunderstanding of createIndividualHologram, or am I doing this wrong? Any help would be greatly appreciated!

    EDIT: Read up on the code, noticed it said that ProtocalLib was needed for individual holos, they are however a bit glitchy, but still works! Thanks!
     
  6. Offline

    filoghost

    Update: added the tutorial for icons & power ups, they're very useful for minigames!
    [​IMG]

    You can find the tutorial in the first post.
     
  7. Offline

    97WaterPolo

    filoghost
    Any specific version of ProtocalLib that is needed for the individual holograms to work? It doesn't seem to work, works maybe 1/10 times when calling it, I am calling it async but within a sync bukkit runnable. Any ideas as to why it isn't individual?
     
  8. Offline

    filoghost

    3.3.1+, I don't know why. Show me your code please
     
  9. Offline

    97WaterPolo

    filoghost I believe I have the latest version of ProtocalLib.
    Show Spoiler

    Code:java
    1. if(Bukkit.getPluginManager().isPluginEnabled("HolographicDisplays")) {
    2. new BukkitRunnable() {
    3. @Override
    4. public void run() {
    5. try {
    6. BufferedImage imageToSend = ImageIO.read(new URL("[url]https://minotar.net/avatar/[/url]" + e.getPlayer().getName() + "/720.png"));
    7. final String[] image = new ImageMessage(imageToSend, 8, ImageChar.MEDIUM_SHADE.getChar()).getLines();
    8. new BukkitRunnable() {
    9. @Override
    10. public void run() {
    11. Hologram h = HolographicDisplaysAPI.createIndividualHologram(plugin, new Location(Bukkit.getWorld("lobby"), -1, 65, 4), e.getPlayer(), image);
    12. holojoin.put(e.getPlayer().getName(), h);
    13.  
    14. }
    15. }.runTask(Annihilation.getInstance());
    16.  
    17. new BukkitRunnable() {
    18. @Override
    19. public void run() {
    20. if(holojoin.containsKey(player.getName()))
    21. holojoin.get(player.getName()).delete();
    22.  
    23. }
    24. }.runTaskLater(Annihilation.getInstance(), 20 * 10);
    25. } catch(Exception ex) {
    26. ex.printStackTrace();
    27. }
    28. }
    29. }.runTaskAsynchronously(Annihilation.getInstance());
    30. }

     
  10. Offline

    97WaterPolo

    filoghost Any idea why the above code isn't working?
     
  11. Offline

    filoghost

    Sorry, I can't really figure out what's wrong. Does everyone see the individual holograms?
     
  12. Offline

    LCastr0

    97WaterPolo are you using the 1.7.10/1.8 version?
    filoghost can you please stop using horses and use bats or wither skulls?
     
  13. LCastr0 There is no 1.8 version.
     
  14. Offline

    LCastr0

    I didn't say Bukkit. I said 1.7.10/1.8. Another server software has done a version of it, and ProtocolLib has a snap of this version.
     
  15. Offline

    filoghost

    LCastr0 when Bukkit 1.8 comes out, I will use armor stands, as suggested by Searge.
     
  16. LCastr0 Support for the software being used should be found on the software's own forums. And a protocol hack isn't a version.
     
  17. Offline

    LCastr0

    Did I ask for support?
     
  18. Offline

    filoghost

    Please keep calm guys. Wait for his reply.
     
  19. Offline

    LCastr0

    filoghost The problem is that what if a server works for both 1.7 and 1.8, the horses won't work in 1.8. I'm saying to make like a 1.7 version using bats or wither skulls, that won't bug in 1.7<->1.8 servers.
     
  20. Offline

    97WaterPolo

    LCastr0
    Straight up 1.7.10, not the one with 1.8 compat. I have had this issue for awhile.
     
  21. Offline

    LCastr0

    If you read what I am suggesting, I already know what is the bug. I am suggesting for those who use both 1.7 and 1.8, like Hypixel, for an example.
     
  22. Offline

    97WaterPolo

    LCastr0
    I understand what you are suggesting, but you asked for the version I was using?

    My issue isn't the holograms, but rather the individual hologram.
     
  23. Offline

    LCastr0


    97WaterPolo
    Didn't I?

    Also, sorry, I was too tired (It was like 6 AM for me), I didn't really understand. Really sorry.
     
    97WaterPolo likes this.
  24. Offline

    filoghost

    Another developer told me 1.8.7 fixed the individual holograms bug, can you try 97WaterPolo ?
     
  25. Offline

    97WaterPolo

  26. Offline

    filoghost

  27. Offline

    Speaw

    Bam o.o
     
  28. Offline

    MiniDigger

    I would use it if it was compatible with 1.8 ;D
     
  29. Offline

    filoghost

  30. Offline

    MiniDigger

Thread Status:
Not open for further replies.

Share This Page