[Lib] NametagSpawner (Spawn Nametags without Mobs)

Discussion in 'Resources' started by DevRosemberg, Feb 21, 2014.

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

    xTrollxDudex

    Anyone up to use NMS code and no NMS imports? No reflection libs allowed :p
     
  2. Offline

    Ultimate_n00b

    Already done (reflection and non-reflection)
     
    xTrollxDudex likes this.
  3. Offline

    DevRosemberg

  4. Offline

    stonebloodtv

    So amazing !
     
  5. Offline

    Ultimate_n00b

    I've not made it public.
     
  6. Offline

    DevRosemberg

  7. Offline

    ccrama

    DevRosemberg, did you get some time to check my code out a bit? I still haven't figured out why it seldom works, even though it is almost identical to the code you and Comphenix used :(
     
  8. Offline

    DSH105

    I've also already got a project that achieves this ;)
     
  9. Offline

    xTrollxDudex

    DSH105
    Ya but you're DBO staff :p
     
  10. Offline

    MrAwellstein

    Some reason this lags my client when I create a big image is it just me?
     
  11. Offline

    Arrxzon

    anything i need to do different for servers ? as it works fine on a singleplayer world but on a server it's horribly glitchy (on times it does work, it looks like a series of falling images)
     
  12. Offline

    macguy8

    MrAwellstein I was experiencing the same thing. I was using 1.7.2. Try using 1.7.4 instead - Somehow, that fixed it for me.
     
  13. Offline

    MrAwellstein


    Didn't do the trick
     
  14. Offline

    sockmonkey1

    I am not really sure about this buy have you (@ccrama ) tried to add priority to your event? Maybe another plugin is winning that one time it doesn't get it.
     
  15. Offline

    ccrama

    sockmonkey1, Its built into the only join event on the server (it runs almost soley on my plugin). I know its failing at that line because it prints the stacktrace there D:. Thanks for the help though
     
  16. Offline

    sockmonkey1

    Lol, maybe you can help me? Tried to do a picture. And I got this:
    [​IMG]

    Code:java
    1. } else if (args[0].equalsIgnoreCase("Logo")) {
    2. BufferedImage img = null;
    3. try {
    4. img = ImageIO.read(new File("logo.png"));
    5. } catch (IOException e) {
    6. e.printStackTrace();
    7. }
    8. NameTagMessage image = new NameTagMessage(img, 30, ImageChar.BLOCK.getChar());
    9. for (Player p : Bukkit.getOnlinePlayers()) {
    10. image.sendToPlayer(p, player.getLocation().add(0, 5, 0));
    11. }


    ccrama

    I see its just my icon being in a weird shape. I think its because of the extra blanks on the insides from the png.

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

    Goblom

    I mean, its not an image but its something... (And i think i'm the first to have a somewhat-working version of something like this)



    Its not fully perfected (as you can tell)... The hologram (name tag, or whatever) is a bit glitchy.
     
  18. Offline

    DSH105

    You should try to implement a GUI-like interface with this (cause it kinda just looks like a nametag right now) ;o.

    Nice work though ;).
     
    Goblom likes this.
  19. Offline

    Goblom

    DSH105 I was thinking of something like that but on a bigger scale...

    Since we can technically have an extremely large amount of entities and images are easily displayed i was thinking of creating a plugin that can stream videos in-game (like a twitch stream, or youtube video), but i have been extremely stuck because i have no experience or knowledge of Codecs and getting an image from a video... so that idea kinda broken down almost instantly...

    I have also thought of create a "TwitchPlays" type thing but with minecraft "BukkitPlays" and create a GBA emulator and have it display the screen with images and to control the "BukkitPlays" GBA emulator you use commands or WASD controls, but i havent found a java-only GBA emulator that can be ported to work with Minecraft...

    Edit: What do you mean by a gui-like interface? Wouldn't it be pretty hard to get the area a player is looking and perform an action or something because getLineOfSight is deprecated (although still can be used).
     
    DSH105 likes this.
  20. Offline

    DevRosemberg

    Oh but we already did it like a week ago. :)
     
  21. Offline

    Goblom

    DevRosemberg D: That can't be!

    Edit: The version for Holographic will support images by the end of tomorrow :D
     
  22. Offline

    DevRosemberg

  23. Offline

    DSH105

    hawkfalcon likes this.
  24. Offline

    DevRosemberg

    DSH105 Idk why but that name is catchy 'HoloAPI'
     
    DSH105 likes this.
  25. Offline

    Goblom

    filoghost likes this.
  26. Offline

    DSH105

    Goblom likes this.
  27. Offline

    DevRosemberg

    Goblom They are not lazy like us and will update it.
     
    Goblom and DSH105 like this.
  28. Offline

    Goblom

    Although currently Holographic uses nms imports as well, so it will need to be updated when CB get updated :/ That is until i get around to converting the nms to reflection.
     
  29. Offline

    Ultimate_n00b

    Spoiler alert, Minecade hired a few more graphic designers. Expect some awesome stuff coming soon, I'll see if I can snag a video for you guys.
     
  30. Offline

    mrCookieSlime

    DevRosemberg
    How can I clear the NameTagMessage?

    spoljo666
    Could you maybe tell me how you solved it?

    My current Code:
    Code:java
    1. @EventHandler
    2. public void onDamage(EntityDamageByEntityEvent e) {
    3. if (e.getDamager() instanceof Player) {
    4. NameTagMessage msg = new NameTagMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("damage").replace("%amount%", String.valueOf(e.getDamage()))));
    5. msg.sendToPlayer((Player) e.getEntity(), e.getEntity().getLocation().getBlock().getRelative(BlockFace.UP).getRelative(BlockFace.UP).getLocation());
    6. }
    7. }
     
Thread Status:
Not open for further replies.

Share This Page