NameTag Hiding

Discussion in 'Plugin Development' started by VinexAx789, Jun 25, 2016.

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

    VinexAx789

    I'm honestly clueless at this point. See I got myself into a dilemma, I wanted to make a few plugins so that they can work with 1.7 - 1.10, so I did that and it worked, but the huge factor was that I used the NameTagVisibility Scoreboard method which toggle them off for everyone but that is for 1.8 only. So I've been on the search for 1.7 methods on doing this and I cannot seem to figure it out. There has to be an Packet for it right? @Comphenix

    Now a guy that has done this before for 1.7 said to me that I should spawn an invisible silverfish on their head that's how he did it.

    So this is what I've created so far:

    Code:
    public void hideNameTag(Player p) {
            Silverfish silverfish = p.getWorld().spawn(p.getLocation().add(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ()), Silverfish.class);
            silverfish.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0));
            silverfish.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, 250));
            silverfish.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, -250));
    }
    It's not working at the moment no errors but it does spawn the Nametag itself shows.

    Mind helping me? I've look around I haven't seen this much. I know it's possible.
     
  2. Offline

    VinexAx789

Thread Status:
Not open for further replies.

Share This Page