Implemented:
1. Configuration system that tracks how many subcommands each command has before the actual message content.
2. Command aliases for /grammar and /grammartoggle - grammartoggle: togglegrammar, enablegrammar, disablegrammar - grammar: viewgrammar
Fixed:
- Unable to uppercase/capitalize the first letter of the word for commands that require a subcommand. - (/msg player hello. → /msg player Hello.)
Update your current commands.yml format:
Updated: commands.yml
# List of commands that should have grammar correction applied
whitelisted-commands:
- say
- msg
- tell
- whisper
- me
# Do not include "/" before the command to avoid any potential issues
# Specifies how many subcommands each command has before the actual message part
# For example: '/msg player hello world' has 1 subcommand ('player') before the message ('hello world')
command-structures:
say: 0 # /say <message> (no subcommands)
msg: 1 # /msg <player> <message>
tell: 1 # /tell <player> <message>
whisper: 1 # /whisper <player> <message>
me: 0 # /me <message> (no subcommands)
# Add other commands with their subcommand counts
# mail: 2 # Example: /mail send <player> <message> (2 subcommands)
Implemented Features:
- Added the ability to whitelist commands that grammar should be applied to using
commands.yml
- Added quotes support in
spellings.txt
to include illegal and/or special characters to be grammar-corrected.
Bugfixes:
- Fixed chat colors cause the first letter not to be capitalized. (&ahello. -> &aHello.)
- Fixed chat colors cause the words not to be overwritten. (&aWoord. -> &aWord.)