[Class] Disguise a player as another player [NMS][Netty][Broken :(]

Discussion in 'Resources' started by bigteddy98, Mar 27, 2014.

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

    bigteddy98

    This resource is no longer available.
     
  2. Offline

    xTrollxDudex

    bigteddy98
    * RedFactory is a simple class to make players red.

    Review code before posting
     
    Skyost likes this.
  3. Offline

    Garris0n

    Probably copy-pasted the terms and forgot to change that message :p
     
    Skyost likes this.
  4. Offline

    bigteddy98

    Owh haha I'm sorry, I indeed copy-pasted it from another class of me :p.
     
  5. Offline

    Timbayens

    This is really usefull, thanks!
     
  6. Offline

    Edrig

    Hello,
    you'll know they can from this class which version works ?
     
  7. Offline

    Garris0n

    If that isn't google translate I don't know what is...

    But it looks to be version 1.7.2.
     
  8. Offline

    MrTwiggy

    I would recommend that anyone who wants to do this just use ProtocolLib + PacketWrapper. WrapperPlayerServerNamedEntitySpawn offers a method 'setPlayerName(String)'. You can intercept this outgoing packet for the player and replace it with the disguised name, rather than having to use NMS.
     
    Comphenix likes this.
  9. Offline

    bigteddy98

    No, 1.7.5, but you can change the imports to 1.7.2_R1 and it will work fine.
     
    Garris0n likes this.
  10. Offline

    Quaro

    This will change player name too? Maybe make separated class for changing only player's appearance(skin) to other player's. And than you could just use manually setDisplayName
     
  11. Offline

    bigteddy98

    Chaning only the skin is not possible without spout yet, you can only change the skin by changing the above head name too.
     
  12. Offline

    Quaro

  13. Offline

    Wombosvideo

  14. Offline

    bigteddy98

    Could be me, but when I can choose between a simple class or a whole other plugin as dependency, I would choose the class.
    Also, I think your way of "changing" the displayName and the listName isn't the best way, cause many problems may accure here (example when a permission plugin uses these names, you completely screw it up)
     
    Skyost likes this.
  15. Offline

    Wombosvideo

    That is true.. But soon those plugin require UUIDs and my Plugin Renames A Player Whenever he uses a command...
     
  16. Offline

    Ultimate_n00b

    Or just convert the name to the UUID? It's not like we're gonna force players to memorize their friend's UUIDs.
     
    ArthurMaker likes this.
  17. Offline

    bigteddy98

    Just a little message to keep you up-to-date. Due to the UUID change I think this class became almost unuseable, sorry for the developers using it in their plugins.

    BigTeddy98,
    Sander.
     
  18. bigteddy98 in the top comment, you made a little typo at #3, it says "a credit would we appreciated" hihi. Cool class though :D
    edit: lol, u no fix it?
     
    bigteddy98 likes this.
  19. Offline

    EcMiner

    There is a bug that whenever someone dies all players get disconnected from the server... Any ideas on how to fix this? There's no errors in console on startup or when someone dies...
     
  20. Offline

    bigteddy98

    Which CB version are you running? And what is the disconnect message to your clients?
     
  21. Offline

    EcMiner

    I am running spigot-1.7.5-R0.1-SNAPSHOT, the message the clients get is: Disconnected from server, and the disconnect reason in the console says: <name> lost connection: Internal Exception: java.lang.NullPointerException
     
  22. Offline

    xTrollxDudex

    EcMiner
    spigot-1.7.5-R0.1-SNAPSHOT run with a real build and come back with results
     
  23. Offline

    EcMiner


    I will try this with craftbukkit, but I think you're overreacting a bit on the whole spigot thing. I've seen a lot of people do it, especially the bukkit staff, it seems they have some kind of hate for spigot, I just don't understand why you and all the others hate spigot so much... If you would like to explain I would be very happy
     
  24. Offline

    bigteddy98

    It's not hate, but Spigot changes the way many things are being handled internal (to improve performance). In this case, for example, it might be causing your players to be disconnected when messing with the sent packets (could be a problem in my class too, don't know yet). When you come here to the Bukkit forum and tell us there are problems caused by our classes, while it might not even be caused (or can be resolved) by us... It's just a bit frustrating.

    Also, on this forum we give you support for your plugins running on a normal cb server, not for Bukkit plugins running on a modified Spigot server.

    - BigTeddy98, Sander.
     
  25. Offline

    EcMiner


    People are still so mean to spigot ;( jk xD. You and xTrollxDudex are right, spigot is causing my players to get disconnected when someone dies. It's really sad cause I really need this class, cause I had a method to change someone's name above their head but whenever you got out of another player's player render range and then got back in it again you would have your normal skin again... But I can't really switch to craftbukkit either cause spigot has a player-shuffle built in which fixes 1 crucial thing for pvp servers...
     
  26. Offline

    bigteddy98

    Send a report to Spigot, they often fix reported problems in feature builds.
     
  27. Offline

    EnderPilot105

    bigteddy98
    On line:

    Code:java
    1. b.set(msg, new GameProfile(i++ + "",
    2. disguisedAs));


    it says: The constructor GameProfile(String, String) is undefined
     
  28. Offline

    bigteddy98

    Like I already said in an earlier message:
    Just a little message to keep you up-to-date. Due to the UUID change in 1.7.9 I think this class became unuseable, sorry for the developers using it in their plugins.

    BigTeddy98,
    Sander.
     
  29. Offline

    JuicyDev


    The new constructor in 1.7.9 in GameProfile(UUID playerUUID, String playerName)
     
  30. Offline

    Wombosvideo

    I am trying it now with
    Code:java
    1. b.set(msg, new GameProfile(MinecraftServer.getServer().getUserCache().a(p.getName()).getId(), disguisedAs));
     
Thread Status:
Not open for further replies.

Share This Page