forked from Pan4ur/ThunderHack-Recode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
нейм протект для друзей (сделал dest4590)
- Loading branch information
Showing
4 changed files
with
45 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
package thunder.hack.modules.misc; | ||
|
||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import thunder.hack.ThunderHack; | ||
import thunder.hack.core.impl.FriendManager; | ||
import thunder.hack.core.impl.ModuleManager; | ||
import thunder.hack.gui.hud.impl.TargetHud; | ||
import thunder.hack.modules.Module; | ||
import thunder.hack.setting.Setting; | ||
|
||
import javax.naming.Name; | ||
import java.util.Objects; | ||
import java.util.Set; | ||
|
||
public class NameProtect extends Module { | ||
public NameProtect() { | ||
super("NameProtect", Category.MISC); | ||
} | ||
|
||
public static Setting<String> newName = new Setting<>("name", "Hell_Raider"); | ||
// friends name protect by dest4590 (https://github.com/dest4590/ThunderHack-Recode/commit/c77e0b9a71afcaec41d88793f12e9cb51328f051#diff-34f70393f6b4a9eebb6ef8909815d48f52849a9860bb19fe7fe1203d68f663a0) | ||
public static Setting<Boolean> friendProtect = new Setting<>("Friend Protect", Boolean.TRUE); | ||
public static Setting<String> friendName = new Setting<>("Friend Name", "Hell_Raider").withParent(friendProtect); | ||
|
||
public static String getCustomName() { | ||
return newName.getValue().replaceAll("&", "\u00a7"); | ||
return ModuleManager.nameProtect.isEnabled() ? newName.getValue().replaceAll("&", "\u00a7") : mc.getGameProfile().getName(); | ||
} | ||
public static String getCustomFriendsName() { | ||
return ModuleManager.nameProtect.isEnabled() && NameProtect.friendProtect.getValue() ? friendName.getValue().replaceAll("&", "\u00a7") : mc.getGameProfile().getName(); | ||
} | ||
|
||
} |
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