-
Turn getDisplayName() into a string [1.15.2]
rip
-
Turn getDisplayName() into a string [1.15.2]
public String test = thePlayer.getDisplayName().getUnformattedText().toString(); public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawDefaultBackground(); if (Options.enabled == true) { this.mc.fontRendererObj.drawStringWithShadow(test, Options.minX + 4, Options.minY + Options.killspos + 2, textDec); //other stuff
-
Turn getDisplayName() into a string [1.15.2]
I want it to display the unformatted text. But whenever I test the string in my GUI it's only showing the formatted one from the server. For example, "B Lawsonwage" in blue formatting rather than just normal white.
-
Turn getDisplayName() into a string [1.15.2]
Is it possible to turn getDisplayName() into a string? I've tried using getDisplayName() .getUnformattedText().toString and nothing ends up happening. I want to use the displayname because it has more information than the name itself.
-
Check if the tab list contains different colored text
Thanks. That worked in a test where I printed it. I do have one more question. How would I compare that to the rest of the players in the game? I made a Collection with NetworkPlayerInfo where I'm able to find the names and turn them into a string. Am I able to turn the display names into a string? Because instead of just the returning the name (like getName does), the displayname gives a "B" for the team letter that im trying to find. I haven't had any luck with it. Every time I try the chat just shows up blank. Any suggestions? @SubscribeEvent public void matchJoin(ClientChatReceivedEvent event) { if (event.message.getUnformattedText().contains("test")) { Collection<NetworkPlayerInfo> players = Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap(); for (final NetworkPlayerInfo networkplayerinfo : players) { //turning displayname into a string
-
Check if the tab list contains different colored text
Hi, I'm trying to get the names of my teammates on Hypixel. Although for some reason on Hypixel getTeam doesn't work. It just results in random numbers Minecraft.getMinecraft().thePlayer.getTeam() The only way I've been able to tell which team the player is in is by the tab list. They're separated into different colors, like this. Is there a way I can use the colors to find who's on my team?
IPS spam blocked by CleanTalk.