Skip to content

Feature - Auto Text Hotkey Module #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 10, 2025

Conversation

ItsNature
Copy link
Collaborator

@ItsNature ItsNature commented Apr 9, 2025

Overview

Description:
The Auto Text Hotkey Module allows servers to provide a list of inputs that are blocked from being used within the Auto Text Hotkey Mod

Changes:
Available options

  • BLOCK_TEXT_INPUTS

    • Whether to use blocked text inputs in the BLOCKED_TEXT_INPUTS option.
    • Values
      • Type: Boolean
      • Default: false
  • BLOCKED_TEXT_INPUTS

    • A list of text inputs that are blocked and cannot be used by the user.
    • Values
      • Type: List<String>
      • Default: ["/sellall", "/msg", "/pay"]
  • BLOCK_CHAT_MESSAGE_TEXT_INPUTS

    • Whether to block all chat messages from being used as hotkeys.
    • Values
      • Type: Boolean
      • Default: false

Code Example:

Set blocked text inputs

private final AutoTextHotkeyModule autoTextHotkeyModule = Apollo.getModuleManager().getModule(AutoTextHotkeyModule.class);

public void setBlockedTextInputs(List<String> blockedTextInputs) {
    Options options = this.autoTextHotkeyModule.getOptions();
    options.set(AutoTextHotkeyModule.BLOCK_TEXT_INPUTS, true);
    options.set(AutoTextHotkeyModule.BLOCKED_TEXT_INPUTS, blockedTextInputs);
}

Block chat message text inputs

private final AutoTextHotkeyModule autoTextHotkeyModule = Apollo.getModuleManager().getModule(AutoTextHotkeyModule.class);

public void setBlockChatMesssageTextInputs(boolean value) {
    this.autoTextHotkeyModule.getOptions().set(AutoTextHotkeyModule.BLOCK_CHAT_MESSAGE_TEXT_INPUTS, value);
}

Review Request Checklist

  • Your code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have tested this change myself. (If applicable)
  • I have made corresponding changes to the documentation. (If applicable)
  • The branch name follows the projects naming conventions. (e.g. feature/add-module & bugfix/fix-issue)

@ItsNature ItsNature added the type: Enhancement Feature improvement or addition label Apr 9, 2025
@ItsNature ItsNature merged commit 114a78a into version/1.1.8 Apr 10, 2025
2 checks passed
@ItsNature ItsNature deleted the feature/auto-text-hotkey-module branch April 10, 2025 19:19
@ItsNature ItsNature mentioned this pull request Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: Enhancement Feature improvement or addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants