This repository has been archived by the owner on Apr 22, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…and close and close #327 * True Durability * Friends List * Separated extratab and tabfriends
- Loading branch information
Showing
4 changed files
with
58 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/render/TabFriends.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package me.zeroeightsix.kami.module.modules.zeroeightysix.render; | ||
|
||
import me.zeroeightsix.kami.command.Command; | ||
import me.zeroeightsix.kami.module.Module; | ||
import me.zeroeightsix.kami.util.zeroeightysix.Friends; | ||
import net.minecraft.client.network.NetworkPlayerInfo; | ||
import net.minecraft.scoreboard.ScorePlayerTeam; | ||
|
||
@Module.Info(name = "TabFriends", description = "Highlights friends in the tab menu", category = Module.Category.RENDER) | ||
public class TabFriends extends Module { | ||
|
||
public static TabFriends INSTANCE; | ||
|
||
public TabFriends() { | ||
TabFriends.INSTANCE = this; | ||
} | ||
|
||
public static String getPlayerName(NetworkPlayerInfo networkPlayerInfoIn) { | ||
String dname = networkPlayerInfoIn.getDisplayName() != null ? networkPlayerInfoIn.getDisplayName().getFormattedText() : ScorePlayerTeam.formatPlayerName(networkPlayerInfoIn.getPlayerTeam(), networkPlayerInfoIn.getGameProfile().getName()); | ||
if (Friends.isFriend(dname)) return String.format("%sa%s", Command.SECTION_SIGN, dname); | ||
return dname; | ||
} | ||
} |