[REQ] Hiding Nameplates

Discussion in 'Archived: Plugin Requests' started by residntevl, Jan 6, 2012.

  1. Offline

    residntevl

    Plugin category: Mechanic Altering (I think)

    Suggested name: NoNameplate

    A bit about me: Hey there, I'm residntevl. I help operate the SeraphicGames minecraft server and we're looking to expand out into making a new server alongside our survival server. This one will be a PvP server.

    What I want: What I want (want is such a needy word) is a plugin that would change the plates above a players' name to be non-existent. OR perhaps dimmed out as if the player was always crouched. I'm not sure if this is possible, as I know little about the coding myself, but that's what a request is for, right? As well, would it be possible to make this compatible with Factions or mcMMO so players who are in the same faction/party are able to see their team members' nameplates?

    Ideas for commands: Perhaps a global turn on/off switch.
    /nameplate on. /nameplate off
    And maybe the ability for admins/mods to turn it on or off for themselves. /nameplate self on /nameplate self off

    Ideas for permissions:
    Have it so admins/mods are always able to see the nameplates:
    nameplate.admin
    Make it possible for admins/mods to change their nameplate on or off:
    nameplate.change.self
    And maybe the ability to turn it on or off for others:
    nameplate.change.other
    Make the global switch permission:
    nameplate.change

    Willing to pay up to: $0 Sadly, we're quite poor and Irish. But perhaps if the coder reading this thinks this would be a great plugin that is possible and would benefit a lot of servers, coding this would be awesome. Though I'm certain I'd find some change to donate if possible.

    When I'd like it by: Possibly by the end of this month or next. There's really no hurry.

    Similar plugin requests: None, that I know of anyways.
     
  2. Offline

    residntevl

    Bumping for great justice.
     
  3. This isn't possible without forcing your players to use spoutcraft.
     
  4. Offline

    residntevl

    Alright, thanks for letting me know. I figured something like that would be the answer.
     
  5. Offline

    Paulpkyou

    That's not true, it is possible, I've been in a server using the official minecraft client and people have had invisible/colored names.
     
    chakyl likes this.
  6. Offline

    Sir Savary

    It's all in the packets.
     
  7. Offline

    lfrst05

    I think it should be possible. You could send all clients (or only some specific clients) a packet to make them believe a player is crouching. To completely remove the nameplate you would need the SpoutPlugin + Spoutcraft clientes.
     
  8. Offline

    mushroomhostage

    I'm also interested in a plugin like this. Closest I know of is
    AutoSneak but it's sneaking is server-side too and has a tendency to interfere with plugins or mods which use sneaking for other purposes.

    ComeCloser is better, completely hiding player nameplates until you're 5-6 blocks away. It requires client modding (not Spoutcraft, however), but the server part is available for CraftBukkit (in addition to the vanilla server).

    Another option for hiding nameplates without any client mods is to use DisguiseCraft or MobDisguise, making the player appear as another mob (villager?). The downside is players lose their custom skins.

    Would anyone be interested in trying a different approach, like AutoSneak but only faking the sneak state on all of the clients? The packet manipulation technique suggested above. It could work similar to VanishNoPacket, maybe it could be called SneakNoPacket :). Perhaps packet manipulation could also be used to blank the nameplate for when it isn't hidden by sneaking (not completely remove it, but probably as close as you can get without DisguiseCraft or client mods).
     
  9. Offline

    Paulpkyou

    Until bukkit adds a method to do this stuff the only way it can be done is actually editing the vanilla/bukkit source, I've done it in fact on vanilla earlier today, i made it so everyone had the color code k in the front of their name so it would show up as random text (like in the end text) :p.
     
  10. Offline

    mushroomhostage

    That's a really good idea, using ChatColor.MAGIC to scramble the nameplates, never would of thought of that :). And it could be better than blanking the nameplates.

    There are a couple of possible solutions for making this into a plugin:

    Compile the modified server, then distribute only your changed class files (with source code, of course). In your plugin installation instructions include a mandatory step for the admin to edit their server jar and replace the classes appropriately. Modding the server jar to add functionality not available through API is the approach taken by http://dev.bukkit.org/server-mods/ore-client-obfuscation/ , and a few other plugins. The downside of course is you can only target a specific build and it's likely to break with every release.

    To make the install process easier, the Java instrumentation APIs can be used to dynamically replace the class files at load time, without requiring any editing of the jar. The server owner simply has to add a command-line flag to load your code before CraftBukkit. I used this technique in http://dev.bukkit.org/server-mods/noseed/ - and it worked well, but has the same compatibility drawbacks.

    Another option is to generalize your changes enough that it would be reasonable for them to be included in the Bukkit API, then submit a pull request. The request would have to be accepted, but if it is, you could use the new API in your plugin, at least after a build is released with the changes (perhaps asking admins to use a development build until then). This is really the best outcome for everyone if you can pull it off.

    Finally, you may be able to use the Java reflection API to alter the core behavior of the server, without waiting on a new build or patching the bytecode. This is the most complex option, but can be useful at times. I believe it is heavily used in http://dev.bukkit.org/server-mods/traincarts/

    So we know blanking/obscuring nameplates is possible (albeit with the caveat of lost player skins), anyone want to do it in a plugin?
     
  11. Offline

    YoshiGenius

    If you change the color of the tag above a player's head on their player, they "lose" their skin..
     
  12. [quote uid=90592945 name="YoshiGenius" post=1049198]If you change the color of the tag above a player's head on their player, they "lose" their skin..[/quote]
    Exactly. That's why you need spoutcraft.
    For all that still don't believe, here's a plugin which allows you to change your name. It doesn't survive a /reload and everybody is able to change his name (no permissions). It works with packet manipulation and reflections: <Edit by Moderator: Redacted mediafire url>


    //EDIT: BTW: I just realized that every player is able to kick nearby players by changing his name to something longer than 16 characters. So see this more as a PoC than a plugin for productivity use.

    //EDIT²: Or use that one: <Edit by Moderator: Redacted mediafire url>

    //EDIT³: For devs that want to know what exactly happens here:
    First off there's a map: original name -> fake name.
    Second the EntityTracker gets replaced with the V10Tracker in onEnable(). The V10Tracker is a slightly modified version of the EntityTracker (it extends it) that uses V10TrackerEntry instead of the original EntityTrackerEntry. The V10TrackerEntry is a optimized (horrible notch code :p) and modified version (it extends it...) of the EntityTrackerEntry. The magic is in the function Packet b() which returns a Packet20NamedEntitySpawn if the tracked entity is a player. The modification simply checks the map (see above) for the players name and if it's a key it writes the value into the packets entity name field:
    Code:java
    1. if(this.tracker instanceof EntityPlayer)
    2. {
    3. EntityPlayer ep = (EntityPlayer)this.tracker;
    4. Packet20NamedEntitySpawn packet20 = new Packet20NamedEntitySpawn(ep);
    5. if(plugin.changedNames.containsKey(ep.name))
    6. packet20.b = plugin.changedNames.get(ep.name);
    7. return packet20;
    8. }

    Last but not least it sends a Packet29DestroyEntity and a modified Packet20NamedEntitySpawn to nearby players whenever you change your name (and in onEnable()) so they see your new name instantly.
    For more information just look into the jar file... ;)
     
    Last edited by a moderator: Nov 11, 2016
    mushroomhostage likes this.
  13. Offline

    Symetron

    I have an idea,

    You could somehow pass off the player as a mob with their skin ( somehow ) and there would be no nameplate.
     
  14. Offline

    np98765

    Not possible to reskin mobs.
     
  15. Thread is older than 3 months
     
  16. Offline

    JOPHESTUS

  17. Offline

    Konkz

  18. Offline

    chasechocolate

    I know this thread is pretty long, but it is possible to completely hide nameplates without client modding or skin break. It's probably all in the packets, my guess Packet20NamedEntitySpawn.
     
  19. Offline

    LaxWasHere

     
  20. But there are news for this topic: We can manipulate the nameplates now, but just add color. What if we add ChatColor.MAGIC in front of the name? ;)
     
  21. Offline

    bobacadodl

    The problem with this is that You can still see a nameplate, so you will know that a player is there. You won't know who it is though.
     
  22. Offline

    residntevl

    May be old, but I still receive e-mails on the thread.

    I originally requested this sort of thing so that in the server you wouldn't know if a player was approaching you because they'd have no nameplate to say "Hey look at me I'm an approaching player!".

    Hell even if it was possible to just dim the nameplate as if the player was sneaking it'd work, but even still not sure if that would work yet without Spout
     
  23. So like this: https://www.dropbox.com/s/j5kdzuqtky12gvv/Hidden.jar (one command to toggle the mode for all players: /hidden)
     
  24. Offline

    OliverDollar

    I've been looking for one of these thats up to date for days, any chance of some perms and player individual command? :D
     
  25. OliverDollar This plugin was just a hint for other devs. The secret involved is player.setSneaking(true); - But there are bits missing like stopping a player from leaving sneaking mode for himself.
     
  26. V10lator - where can we find the thread of your hidden-plugin? With wich version of MC does it work?

    hmm.. how can i do this? It´s better to see a decryptet nameplate than seeing the correct name. So on roll-playing server you have to ask for the realname, etc. But is the skin kept?
     
  27. Offline

    YoshiGenius

    The deal with 1.5 is (as far as I have heard), correct me if I am wrong, name tags retain a players skin regardless of what they are set to. You could set their name to " ".
     
  28. hmm no, if the tagname changed by a nickname-plugin, the skin changes, too. So my hope goes to Postkutsche...
     
  29. Offline

    YoshiGenius

    Ah, okay. Just I heard that 1.5 works regardless of the name above the head. Meh, I'll have to test. xD
     

Share This Page