# Commands Usage

## Commands & Administration

BuildersWand provides a comprehensive set of commands for both players and administrators. All commands use the `/bw` alias and include tab completion for easy use.

### Player Commands

#### Basic Commands

**`/bw` or `/bw help`**

**Permission**: `builderswand.use`&#x20;

**Description**: Displays the help menu with available commands&#x20;

**Usage**: `/bw`

**`/bw give`**

**Permission**: `builderswand.give` **Description**: Gives a wand to yourself or another player **Usage**:

* `/bw give <wand_name> <player> # player is optional here` - Gives a specific wand by name

**Example**:

\- `/bw give Steve advanced`&#x20;

**`/bw undo`**

**Permission**: `builderswand.undo`&#x20;

**Description**: Undoes your last wand action&#x20;

**Usage**: `/bw undo` **Notes**:

* Only works for players (not console)
* Limited to last 3 actions
* Works for both placement and breaking actions

### Administrator Commands

#### Configuration Management

**`/bw reload`**

**Permission**: `builderswand.reload`&#x20;

**Description**: Reloads all configuration files&#x20;

**Usage**: `/bw reload` **What it reloads**:

* `config.yml` settings
* `wands.yml` wand definitions
* Language files
* Translation system

#### Statistics & Monitoring

**`/bw stats`**

**Permission**: `builderswand.admin.stats`&#x20;

**Description**: Displays usage statistics&#x20;

**Usage**: `/bw stats`&#x20;

**Shows**:

* Total players and wands used
* Top 5 players by block usage
* Wand usage statistics
* Blocks placed vs broken

**`/bw clearstats`**

**Permission**: `builderswand.admin.clearstats`&#x20;

**Description**: Clears all collected statistics&#x20;

**Usage**: `/bw clearstats`&#x20;

**Warning**: This action cannot be undone

#### Logging Management

**`/bw logs`**

**Permission**: `builderswand.admin.logs`&#x20;

**Description**: Shows logging configuration status&#x20;

**Usage**: `/bw logs`&#x20;

**Displays**:

* Whether logging is enabled
* Console logging status
* File logging status
* Log file location and size limits

**`/bw cleanuplogs`**

**Permission**: `builderswand.admin.cleanuplogs`&#x20;

**Description**: Cleans up old log files&#x20;

**Usage**: `/bw cleanuplogs`&#x20;

**What it does**:

* Removes log files older than retention period
* Frees up disk space
* Maintains log file size limits

### Permission System

#### Player Permissions

* `builderswand.use` - Basic wand usage
* `builderswand.give` - Give wands to players
* `builderswand.undo` - Use undo functionality

#### Wand-Specific Permissions

* `builderswand.use.basic` - Use basic wand
* `builderswand.use.advanced` - Use advanced wand
* `builderswand.use.expert` - Use expert wand
* `builderswand.use.creative` - Use creative wand
* `builderswand.craft.basic` - Craft basic wand
* `builderswand.craft.advanced` - Craft advanced wand
* `builderswand.craft.expert` - Craft expert wand
* `builderswand.craft.creative` - Craft creative wand

#### Administrative Permissions

* `builderswand.reload` - Reload configuration
* `builderswand.admin.stats` - View statistics
* `builderswand.admin.clearstats` - Clear statistics
* `builderswand.admin.logs` - View logging status
* `builderswand.admin.cleanuplogs` - Clean up logs
* `builderswand.bypass.*` - Bypass all restrictions

#### World & Region Permissions

* `builderswand.use.world.<worldname>` - Use wands in specific world
* `builderswand.use.region.<regionname>` - Use wands in specific region
* `builderswand.bypass.permissions` - Bypass all permission checks

### Command Examples

#### For Players

* `/bw # Show help`
* `/bw give Steve advanced # Give Steve an advanced wand`
* `/bw undo # Undo last action`&#x20;

#### For Administrators

* `/bw reload # Reload all configs`
* `/bw stats # View usage statistics`
* `/bw clearstats # Clear all statistics`
* `/bw logs # Check logging status`
* `/bw cleanuplogs # Clean up old logs`&#x20;

### Configuration Management

#### Reloading Configuration

The `/bw reload` command safely reloads all configuration files:

* Stops any ongoing operations
* Loads new configuration values
* Updates wand definitions
* Refreshes language files
* Maintains player data integrity

#### Best Practices

1. **Test changes first**: Always test configuration changes on a test server
2. **Backup configs**: Keep backups of working configurations
3. **Reload during low activity**: Reload during server maintenance windows
4. **Monitor after reload**: Check for any errors in console after reloading

### Statistics & Monitoring

#### What's Tracked

* **Player statistics**: Blocks placed/broken per player
* **Wand usage**: Which wands are used most frequently
* **Session data**: Current session block counts
* **Daily limits**: Daily usage tracking

#### Statistics Commands

* `/bw stats` - View comprehensive statistics
* `/bw clearstats` - Reset all statistics

#### Logging Features

* **Console logging**: Real-time console output
* **File logging**: Persistent log files
* **Log rotation**: Automatic log file management
* **Size limits**: Configurable log file sizes

### Troubleshooting Commands

#### Common Issues

1. **Permission denied**: Check player has required permissions
2. **Wand not found**: Verify wand tier/name exists in config
3. **Player not found**: Ensure player is online
4. **Statistics disabled**: Enable statistics in config

#### Debug Information

* Check console for error messages
* Use `/bw logs` to verify logging status
* Review permission nodes with permission plugins
* Test commands with different permission levels

### Easter Egg

There's a hidden easter egg command that provides a fun surprise for those who discover it. The command includes special sound effects and messages, but we won't spoil the fun by revealing it here!
