# Custom Commands v1.0.1 Update
## ✨ New Feature: Command Type System
### ⚙️ Console vs Player Execution
You can now control how commands are executed when using custom commands!
- **Console Type** (default): Commands execute as server console with full permissions
- **Player Type**: Commands execute as the player who used the command (respects player permissions)
### 🎯 Use Cases
**Console Type** - Perfect for admin commands:
- Give effects, teleport players, kick/ban
- Works even if player doesn't have permission
**Player Type** - Perfect for plugin integration:
- Execute commands like `/home`, `/warp`, `/balance`, `/spawn`
- Player needs permission for the command to work
### 🎨 Example Usage
```yaml
# Player executes /balance when using /hi
hi:
type: "Player"
commands:
- "/balance"
message:
- "&eChecking your balance..."
```
```yaml
# Console executes effect command (works without player permission)
glow:
type: "Console"
commands:
- "effect give {player} minecraft:glowing 10 1 true"
message:
- "&eYou are now glowing!"
```
## 🔄 Upgrade Guide
If you're upgrading from v1.0.0, you need to update your `config.yml`:
### 1. Change Field Name
**Change:** `console_commands:` → `commands:`
### 2. Add Type Field (Optional)
Add the `type` field to control command execution. If not specified, defaults to `"Console"`.
**Example:**
```yaml
# Old (v1.0.0)
example:
console_commands:
- "/balance"
- "effect give {player} minecraft:glowing 10 1 true"
# New (v1.0.1) - Console Type (default)
example:
type: "Console" # Optional: defaults to "Console" if not specified
commands:
- "/balance"
- "effect give {player} minecraft:glowing 10 1 true"
# New (v1.0.1) - Player Type
example:
type: "Player" # Commands execute as the player
commands:
- "/balance" # Player needs permission for /balance
```
**Steps:**
1. Replace all `console_commands:` with `commands:` in your config
2. (Optional) Add `type: "Console"` or `type: "Player"` to each command that has `commands:`
3. If `type` is not specified, it defaults to `"Console"` (same behavior as before)
The field name change makes more sense since commands can now execute as either Console or Player depending on the `type` setting.
## 📋 Technical Details
- Commands are executed on the main server thread
- Full variable support: `{player}`, `{world}`, `{x}`, `{y}`, `{z}`, etc.
- Works with all Minecraft commands and plugin commands
- Thread-safe and performance optimized
## 🔗 Links
- **Discord**: [Join our Discord](https://discord.gg/vwrZFyzN)
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }