Links
Tags
Creators
Details
1.1.1
Compatibility
Changes
🎉 Custom Commands v1.1.1 - Required Arguments & Individual Argument Variables
🚀 New Feature: Required/Optional Arguments
We've added powerful new argument handling features that make commands even more flexible!
✨ New Features
📝 Required Arguments Support
- Mark individual arguments as required using
required-args: [0] - First argument required, second optional? Now possible!
- Perfect for commands like
/ah sell <price> [amount] - Clear error messages when required arguments are missing
🔢 Individual Argument Variables
- New variables:
{arg:1},{arg:2},{arg:3}, etc. - Access each argument individually (1-based index)
{arg:1}= First argument{arg:2}= Second argument (empty string if not provided){arg:N}= Nth argument{args}= All arguments as string (backward compatible)
📋 Example Usage
ah:
subcommands:
sell: # /ah sell <price> [amount]
arguments:
required-args: [0] # First argument (price) is REQUIRED
no-arguments: false
commands:
- "tellraw {player} [\"\",{\"text\":\"Price: \",\"color\":\"gold\"},{\"text\":\"{arg:1}\",\"color\":\"green\"}]"
# {arg:1} = price (required)
# {arg:2} = amount (optional, empty if not provided)
Usage:
- ✅
/ah sell 100→{arg:1}="100",{arg:2}="" - ✅
/ah sell 100 64→{arg:1}="100",{arg:2}="64" - ❌
/ah sell→ Error: "Usage: /ah sell <price> [amount]"
🔧 Technical Improvements
- Enhanced argument validation system
- Individual argument extraction and processing
- Improved variable replacement in messages and commands
- Better error messages for missing required arguments
📝 What Changed
- Added
required-argsconfiguration option - Implemented individual argument variables (
{arg:1},{arg:2}, etc.) - Enhanced argument validation to check required arguments
- Updated variable replacement system
🎯 Compatibility
- ✅ Fully backward compatible - All existing
{args}usage still works - ✅ No breaking changes - Existing configurations work as before
- ✅ Optional feature - Only use if you need required/optional arguments
📦 Installation
Simply update to v1.1.1 - no configuration changes needed! Your existing commands will work exactly as before.
Full Changelog:
- Added
required-argsconfiguration option for marking individual arguments as required - Implemented individual argument variables:
{arg:1},{arg:2},{arg:3}, etc. - Enhanced argument validation to check for required arguments
- Improved variable replacement system for better argument handling
- Updated documentation with new examples
Need help? Join our Discord: https://discord.gg/2a4a3mWR4r
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:XRwXgh5o:SXreX5dE"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:XRwXgh5o:SXreX5dE"
}

