Skip to content

Commit

Permalink
make hide ranks only work in lobbies
Browse files Browse the repository at this point in the history
  • Loading branch information
MicrocontrollersDev committed Apr 21, 2022
1 parent 371df10 commit 3c43282
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import cc.woverflow.hytils.HytilsReborn;
import cc.woverflow.hytils.config.HytilsConfig;
import cc.woverflow.hytils.util.locraw.LocrawInformation;
import gg.essential.api.EssentialAPI;
import net.minecraft.client.network.NetworkPlayerInfo;
import org.objectweb.asm.tree.ClassNode;
Expand Down Expand Up @@ -60,7 +61,8 @@ public static String modifyName(String name, NetworkPlayerInfo networkPlayerInfo
if (EssentialAPI.getMinecraftUtil().isHypixel()) {
final UUID uuid = networkPlayerInfo.getGameProfile().getId();

if (HytilsConfig.hidePlayerRanksInTab && name.startsWith("[", 2)) {

if (HytilsConfig.hidePlayerRanksInTab && name.startsWith("[", 2) && HytilsReborn.INSTANCE.getLobbyChecker().playerIsInLobby()) {
// keep the name color if player rank is removed
// §b[MVP§c+§b] Steve
final String color = "\u00a7" + name.charAt(1);
Expand Down

0 comments on commit 3c43282

Please sign in to comment.