- Joined
- Jul 11, 2020
- Messages
- 0
- Reaction score
- 25
- Points
- 0
this isn't from virtue, i actually coded this
[HIDE-REPLY]Class itself:
In your Main/Client class
Lastly, in EntityPlayerSP, replace the sendChatMessage function to this:
[/HIDE-REPLY]
and there you go
to change the prefix, just go into the Main/Client class and replace "@" with whatever
if this is not toggled, commands from the client will not work, and will just show up in the chat making you look dumb/showing your a haxr
[HIDE-REPLY]Class itself:
Code:
package us.loki.freaky.modules.impl.Player;
import org.lwjgl.input.Keyboard;
import us.loki.freaky.modules.*;
public class ChatCommands extends Module{
public ChatCommands() {
super("ChatCommands", "ChatCommands", Keyboard.KEY_NONE, Category.PLAYER);
}
}
Code:
public static boolean onSendChatMessage(String s) {
if(ModuleManager.getModuleByName("ChatCommands").isEnabled()) {
if (s.startsWith("@")) {
cmdManager.callCommand(s.substring(1));
return false;
}
}
for (Module m : ModuleManager.getModules()) {
if (Module.isToggled(true)) {
return m.onSendChatMessage(s);
}
}
return true;
}
Code:
/**
* Sends a chat message from the player. Args: chatMessage
*/
public void sendChatMessage(String message)
{
//freaky
if(ModuleManager.getModuleByName("ChatCommands").isEnabled()) {
if(Client.onSendChatMessage(message)){
this.sendQueue.addToSendQueue(new C01PacketChatMessage(message));
}
}
else{
this.sendQueue.addToSendQueue(new C01PacketChatMessage(message));
}
}
and there you go
to change the prefix, just go into the Main/Client class and replace "@" with whatever
if this is not toggled, commands from the client will not work, and will just show up in the chat making you look dumb/showing your a haxr
31.08.2018 - by FantaCoke
Hide-Tags verändert (unnötige Tags entfernt)
Code-Tags hinzugefügt
Hide-Tags verändert (unnötige Tags entfernt)
Code-Tags hinzugefügt
Last edited by a moderator: