Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DragOP.commandManager = function(cmd) {
- var commandSplit = cmd.split(" ");
- switch(commandSplit[0]) {
- case "help":
- clientMessage("[DragOP] Help command is coming soon!");
- break;
- case "t":
- if(cmd.substring(2, cmd.length) != null && cmd.substring(2, cmd.length) != undefined) {
- DragOP.mods.forEach(function (entry, index, array) {
- if(entry.toLowerCase() == cmd.substring(2, cmd.length).toLowerCase() && DragOP.mods[index].isStateMode()) {
- DragOP.mods[index].onClick(null);
- DragOP.ctoast("Sucessfully toggled module " + entry.toLowerCase());
- return;
- }
- });
- DragOP.ctoast("Module " + cmd.substring(2, cmd.length) + " can't be found/toggled!");
- } else {
- DragOP.ctoast("Syntax error!");
- }
- break;
- }
- }
- function chatHook(text) {
- if(text.charAt(0) == ".") {
- preventDefault();
- com.mojang.minecraftpe.MainActivity.currentMainActivity.get().nativeSetTextboxText("");
- com.mojang.minecraftpe.MainActivity.currentMainActivity.get().updateTextboxText("");
- DragOP.commandManager(text.substring(1, text.length));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement