NoNameTags - Completely hide a players nametag.

Discussion in 'Resources' started by Kazzababe, Jul 7, 2014.

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

    Kazzababe

    NoNameTags is a plugin that allows a developers to completely hide a players nametag, name and the black rectangle.

    Why Use NoNameTags?
    As far as I'm aware, there no other plugins that can hide both the players name and the black rectangle behind the name.

    Methods:
    Use the below method to hide a players nametag
    Code:java
    1.  
    2. Player player = Bukkit.getPlayer("Kazzababe");
    3. NoNameTags.hideNametag(player);
    4.  

    Use the below method to show a players nametag
    Code:java
    1.  
    2. Player player = Bukkit.getPlayer("Kazzababe");
    3. NoNameTags.showNametag(player);
    4.  

    Use the below method to check whether or not a players nametag is hidden.
    Code:java
    1.  
    2. Player player = Bukkit.getPlayer("Kazzababe");
    3. boolean isHidden = NoNameTags.isNametagHidden(player);
    4. //This method is not currently available as of this being posted but the file should approved soon
    5.  


    Note:
    This does use NMS, so those using the plugin may have to wait a while in between MC updates for an update that will be compatible with the MC update.

    Screenshots:
    http://imgur.com/XY7m8zS

    Where to download NoNameTags:
    http://dev.bukkit.org/bukkit-plugins/nonametags/
     
    Zupsub and Skyost like this.
  2. Offline

    Garris0n

    Why exactly did you use NMS for the entity? I see no reason for it.
     
    Skyost likes this.
  3. Offline

    Kazzababe

    Cause that's how I discovered how it works; by creating a custom entity.
    I'm doing some testing now without NMS, and assuming it works (which it should), I'll be uploading a new file soon.
     
    jimuskin, Ultimate_n00b and Skyost like this.
  4. Offline

    Skyost

    Kazzababe I think I will use it in my Project HungerGames if a version without NMS is released ;)
     
  5. Offline

    Garris0n

    Never use NMS "just because". Use it when it's 100% necessary, and even then you should be doing this.
     
  6. Offline

    Ultimate_n00b

    Fact is, you need NMS to do this. Sorry to burst your bubble.
     
    jimuskin and Kazzababe like this.
  7. Offline

    Garris0n

    Why?
     
  8. Offline

    Kazzababe

    It can be done without NMS, but it wouldn't be as complete.
    I'm still looking for workarounds, but as of now, I haven't found anything that works as well.
     
    Skyost likes this.
  9. Offline

    Deleted user

    Kazzababe Garris0n Ultimate_n00b
    I don't get it. What's so difficult about not using NMS?

    Code:
    Bat bat = (Bat) player.getWorld().spawnEntity(p.getLocation(), EntityType.BAT);
    bat.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 50000, 2, true));
    bat.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 50000, 255, true));
    player.setPassenger(bat);
    
     
  10. Offline

    Kazzababe


    There's a reason I don't want that. Bat still makes noise and you can see the particle effects.
     
  11. Offline

    Deleted user

    Kazzababe
    Ohh. I don't have sounds turned on, so I didn't realize.

    Hmm. Time to keep thinking

    You could use an EnderPearl, and it doesn't show on anyone's screen but the person who's getting their nametag hidden

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

    Garris0n

    ProtocolLib.

    Also, you can use the horse glitch that makes holograms work.
     
  13. Offline

    Kazzababe


    I don't want any extra dependencies.
     
  14. Offline

    HeavyMine13

    What is the horse glitch, I wonder!
     
  15. Offline

    Deleted user

    HeavyMine13
    Horse on a witherskull with a negative age results in the horse nameplate being below the horse.

    Also, the witherskull is invisible with no velocity
     
  16. Offline

    Garris0n

    Replace your plugin with ProtocolLib, it would serve no purpose without the NMS.

    Same number of dependencies.
     
    Skyost likes this.
  17. Offline

    Kazzababe

    Not at all, with NMS, all you're relying on is me being vigilant on updating. With ProtocolLib, you're relying on the other user being vigilant with updating their plugin AND server owners have to use another plugin along with mine.
     
  18. Offline

    xTrollxDudex

  19. Offline

    Zupsub

    Would be the best if you could add a method to hide a nametag of a player only for a few other players (so everyone else can still see it).
    Then you'll have to depend on ProtocolLib I guess.

    Anyway thanks!:D:dia:
     
  20. Offline

    Deleted user

    Zupsub
    Do it yourself. Send some packets.
     
  21. Offline

    Ultimate_n00b

    Garris0n: dont use nms
    Garris0n: just add this giant nms library
     
    TigerHix, ampayne2 and Squid_Boss like this.
  22. Offline

    Skyost

    Ultimate_n00b I do not think you understand his perspective...
     
    Garris0n likes this.
  23. Offline

    Garris0n

    I would trust Comphenix quite a bit more to provide good and updated code (no offense OP). Regardless, my main issue was with the seemingly rather useless custom entity.
     
    Skyost likes this.
  24. Offline

    Ultimate_n00b

    The custom entity was useless (the code for that entity was originally mine, and it had a different use); however the fact that it's only a few lines (even with reflection) and that it uses methods that won't be changing their name soon, shows that doesn't require a giant nms library and adding yet another entity to bukkit.
     
  25. Offline

    Fr3eaky

    Why the Hell it doenst work for me??

    [04:26:45 ERROR]: Error occurred while enabling NoNameTags v1.0 (Is it up to date?)
    java.lang.NoClassDefFoundError: me/kazzababe/bukkit/entities/NametagEntity
    at me.kazzababe.bukkit.NoNameTags.onEnable(NoNameTags.java:27) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:324) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:455) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:389) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.n(MinecraftServer.java:352) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.g(MinecraftServer.java:326) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.a(MinecraftServer.java:282) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:189) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks][04:26:45 ERROR]: Error occurred while enabling NoNameTags v1.0 (Is it up to date?)
    java.lang.NoClassDefFoundError: me/kazzababe/bukkit/entities/NametagEntity
    at me.kazzababe.bukkit.NoNameTags.onEnable(NoNameTags.java:27) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:324) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:455) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:389) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.n(MinecraftServer.java:352) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.g(MinecraftServer.java:326) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.a(MinecraftServer.java:282) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:189) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit-1.7.10-R0.1-20140713.051447-4.jar:git-Bukkit-1.7.9-R0.2-15-g66c314d-b3104jnks]
     
  26. Offline

    Kazzababe

    This tends to happen when creating a custom entity using NMS, and I'm currently redoing how it's all done.
     
Thread Status:
Not open for further replies.

Share This Page