-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e91b35
commit 9bd25ed
Showing
24 changed files
with
751 additions
and
125 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
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
52 changes: 52 additions & 0 deletions
52
src/main/java/xyz/templecheats/templeclient/impl/command/commands/BindCommand.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,52 @@ | ||
package xyz.templecheats.templeclient.impl.command.commands; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import xyz.templecheats.templeclient.TempleClient; | ||
import xyz.templecheats.templeclient.impl.command.Command; | ||
import xyz.templecheats.templeclient.impl.modules.Module; | ||
import org.lwjgl.input.Keyboard; | ||
import net.minecraft.util.text.TextComponentString; | ||
import net.minecraft.util.text.TextFormatting; | ||
|
||
public class BindCommand implements Command { | ||
|
||
@Override | ||
public String getName() { | ||
return ".bind"; | ||
} | ||
|
||
@Override | ||
public void execute(String[] args) { | ||
if (args.length != 3) { | ||
sendMessage("Invalid syntax. Use .bind <module> <key>"); | ||
return; | ||
} | ||
|
||
String moduleName = args[1]; | ||
String keyName = args[2]; | ||
|
||
Module module = TempleClient.moduleManager.getModuleByName(moduleName); | ||
|
||
if (module == null) { | ||
sendMessage("Module " + moduleName + " not found."); | ||
return; | ||
} | ||
|
||
int keyCode = Keyboard.getKeyIndex(keyName.toUpperCase()); | ||
|
||
if (keyCode == Keyboard.KEY_NONE) { | ||
sendMessage("Key " + keyName + " not found."); | ||
return; | ||
} | ||
|
||
module.setKey(keyCode); | ||
sendMessage("Bound " + moduleName + " to " + keyName + "."); | ||
} | ||
|
||
private void sendMessage(String message) { | ||
String templePrefix = TextFormatting.AQUA + "[Temple] " + TextFormatting.RESET; | ||
Minecraft.getMinecraft().player.sendMessage( | ||
new TextComponentString(templePrefix + message) | ||
); | ||
} | ||
} |
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
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
39 changes: 39 additions & 0 deletions
39
src/main/java/xyz/templecheats/templeclient/impl/modules/chat/Spammer.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,39 @@ | ||
package xyz.templecheats.templeclient.impl.modules.chat; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import xyz.templecheats.templeclient.impl.gui.clickgui.setting.Setting; | ||
import xyz.templecheats.templeclient.impl.modules.Module; | ||
|
||
public class Spammer extends Module { | ||
|
||
private Setting delay; | ||
private Thread spammerThread; | ||
private boolean running; | ||
|
||
public Spammer() { | ||
super("Spammer", 0, Category.CHAT); | ||
delay = new Setting("Delay", this, 5, 1, 60, true); | ||
} | ||
|
||
@Override | ||
public void onEnable() { | ||
running = true; | ||
spammerThread = new Thread(() -> { | ||
while (running) { | ||
Minecraft.getMinecraft().player.sendChatMessage("TempleClient on top ! | https://templecheats.xyz"); | ||
try { | ||
Thread.sleep((long) delay.getValDouble() * 1000); | ||
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
}); | ||
spammerThread.start(); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
running = false; | ||
spammerThread.interrupt(); | ||
} | ||
} |
Oops, something went wrong.