how would I change the player name (I don't want to use teams I am also using 1.8 and don't know if it has teams but I am pretty sure it does and I would rather not use another plugin for changing the name) I would like to change their name in everything in tab chat and above them
@Cat 700 You could change the name using their GameProfile, though that would require reflection and then Player#getName() would return your changed value. (in case you go this way, i think the field is 'name')
@Cat 700 Here are some useful links: Reflection: https://www.oracle.com/technetwork/articles/java/javareflection-1536171.html GameProfile: https://www.spigotmc.org/threads/nms-tutorials-3-gameprofiles.205493/
how would I change the player name if I was to use scoreboards and not game profile or just what is a easier way
@Cat 700 I'm not sure, i haven't worked much with scoreboards. :7 Try looking up some scoreboard tutorials.
@KarimAKL I can't figure out how to change the name of a game profile and nothing else how would I do that
I'm not really sure what you're after but why can't you just use player#setDisplayName() Sent from my LYA-L09 using Tapatalk
@CraftCreeper6 I can is it not player.setdisplayname? Also I have tried that and it does not work (for me at least have not tried other people looking at my username) and I also want to try using game profiles
I don't think that changes the name tag, only the chat name, and then you can use Player#setPlayerListName for the tab list, but there's nothing about the name tag. (at least from what i can see) What do you mean?
@Cat 700 @KarimAKL Use player#setDisplayName(), then update player#setPlayerListName() with player#getDisplayName(), create a new scoreboard for above the players head and also use player#getDisplayName() to show it. What's wrong with this approach?
@CraftCreeper6 I didn't say anything was wrong with it but as i said earlier: So i wouldn't know about the scoreboard part.
@KarimAKL Was more focused on the OP Only tahg'd you to let you know what I was talking about The method I was going for wouldn't work well anyway. It would still display the players name as is; just with something else below it. I think the OP will have to go will have to go with @KarimAKL's method of GameData. I found a util for it but it only works for 1.8. It can be found here Good luck.
Sorry for not replying to anything on vacation I tried player.setdisplayname but that didn't work but not the way you said I also was gonna try player. Setcustomname but I will try your way I would still like to know how to make a gameprofile for NPC's because I think they need them but I haven't done much with NPC's and @KarimAKL when you said what do you mean to my last post what I meant was I haven't found anything other than chaning the skin but that takes a website and @CraftCreeper6 can I still use scoreboards teams to make a prefix/suffix
1. Changing the skin doesn't require reflection, but changing the name does, that's probably why you've only found that. 2. Changing the skin doesn't require any URL, you can set the textures to another player's textures.
@Cat 700 I did a bit of Google'ing and found a necro post, https://bukkit.org/threads/how-to-change-a-players-name-above-head-11-1-2.442977/ The first post by @AlvinB could be what you're looking for, download the jar and add it externally just like you would Bukkit, and use it like normal, I'm not certain on a version though.
Thanks will do some of my own research as well but that doesn't normally find me much If I was using protocollib could I use packets to change the name and if so how? EDIT by Moderator: merged posts, please use the edit button instead of double posting.