# Plugin Integrations

## Plugin Integrations

BuildersWand integrates with several popular Minecraft plugins to ensure compatibility and respect their protection systems. These integrations work automatically when the plugins are detected on your server.

### Supported Integrations

#### WorldGuard

**Purpose**: Respects WorldGuard region protections and flags **What it does**: Checks if players have permission to build in WorldGuard regions before allowing wand usage **Configuration**:

```yaml
advanced:
  integrations:
    worldguard:
      enabled: true
      check-regions: true
      allow-bypass: true
```

**Bypass Permission**: `builderswand.bypass.worldguard`

#### CoreProtect

**Purpose**: Logs all wand operations for rollback capability **What it does**: Automatically logs block placements and removals to CoreProtect's database **Configuration**:

```yaml
advanced:
  integrations:
    coreprotect:
      enabled: true
      log-operations: true
      log-rollback: true
```

**Features**:

* Logs block placements with player attribution
* Logs block removals for rollback support
* Respects CoreProtect's rollback system

#### ItemsAdder

**Purpose**: Supports custom blocks and items from ItemsAdder **What it does**: Allows wands to work with custom blocks and items added by ItemsAdder **Configuration**:

```yaml
advanced:
  integrations:
    itemsadder:
      enabled: true
      support-custom-blocks: true
      support-custom-items: true
```

**Features**:

* Detects and works with custom blocks
* Supports custom item placement
* Maintains custom block properties

#### Protection Plugins

**GriefPrevention**

**Purpose**: Respects GriefPrevention claim boundaries

**What it does**: Checks if players have permission to build in GriefPrevention claims

**Bypass Permission**: `builderswand.bypass.griefprevention`

**Towny**

**Purpose**: Respects Towny town and nation boundaries

**What it does**: Checks town permissions for building and destroying blocks

**Bypass Permission**: `builderswand.bypass.towny`

**Lands**

**Purpose**: Respects Lands plugin area protections

**What it does**: Checks Lands area permissions for block placement and removal

**Bypass Permission**: `builderswand.bypass.lands`

**SuperiorSkyblock**

**Purpose**: Respects SuperiorSkyblock island boundaries

**What it does**: Only allows island members to use wands within their island area

**Bypass Permission**: `builderswand.bypass.skyblock`

**BentoBox**

**Purpose**: Respects BentoBox island protections

**What it does**: Checks island permissions for building and destroying blocks

**Bypass Permission**: `builderswand.bypass.bentobox`

#### mcMMO

**Purpose**: Prevents mcMMO skill conflicts

**What it does**: Marks blocks as placed by mcMMO to prevent skill conflicts

**Bypass Permission**: `builderswand.bypass.mcmmo`

### Integration Configuration

#### Global Settings

Integrations can be configured globally in `config.yml`:

```yaml
advanced:
  integrations:
    worldguard:
      enabled: true
      check-regions: true
      allow-bypass: true
    
    coreprotect:
      enabled: true
      log-operations: true
      log-rollback: true
    
    itemsadder:
      enabled: true
      support-custom-blocks: true
      support-custom-items: true
```

#### Per-Wand Settings

Each wand can have its own integration settings in `wands.yml`:

```yaml
wands:
  basic:
    integrations:
      worldguard:
        enabled: true
        bypass_permission: "builderswand.bypass.worldguard"
      griefprevention:
        enabled: true
        bypass_permission: "builderswand.bypass.griefprevention"
      towny:
        enabled: true
        bypass_permission: "builderswand.bypass.towny"
      lands:
        enabled: true
        bypass_permission: "builderswand.bypass.lands"
      superior_skyblock:
        enabled: true
        bypass_permission: "builderswand.bypass.skyblock"
      bentobox:
        enabled: true
        bypass_permission: "builderswand.bypass.bentobox"
      mcmmo:
        enabled: true
        bypass_permission: "builderswand.bypass.mcmmo"
      itemsadder:
        enabled: true
        bypass_permission: "builderswand.bypass.itemsadder"
```

### How Integrations Work

#### Automatic Detection

BuildersWand automatically detects installed plugins and enables integrations accordingly. No manual setup is required.

#### Permission Checking

When a player uses a wand, the plugin checks all relevant integrations:

1. Verifies the player has permission in the current location
2. Respects protection plugin boundaries
3. Logs operations to compatible logging plugins
4. Handles custom blocks and items appropriately

#### Bypass Permissions

Each integration has a bypass permission that allows administrators to override protection checks:

* `builderswand.bypass.worldguard`
* `builderswand.bypass.griefprevention`
* `builderswand.bypass.towny`
* `builderswand.bypass.lands`
* `builderswand.bypass.skyblock`
* `builderswand.bypass.bentobox`
* `builderswand.bypass.mcmmo`
* `builderswand.bypass.itemsadder`

### Troubleshooting Integrations

#### Integration Not Working

1. **Check if the plugin is installed**: BuildersWand only integrates with plugins that are actually installed
2. **Verify plugin versions**: Ensure you're using compatible versions of both plugins
3. **Check permissions**: Make sure players have the necessary permissions in the protection plugin
4. **Review bypass permissions**: Administrators can use bypass permissions to override restrictions

#### Performance Issues

1. **Disable unused integrations**: Turn off integrations for plugins you don't use
2. **Check protection plugin settings**: Some protection plugins have performance settings that can affect wand usage
3. **Review logging settings**: CoreProtect logging can impact performance on busy servers

#### Custom Block Issues

1. **Verify ItemsAdder integration**: Ensure ItemsAdder integration is enabled
2. **Check custom block permissions**: Some custom blocks may have their own permission requirements
3. **Test with vanilla blocks first**: Verify the wand works with vanilla blocks before testing custom ones

### Best Practices

#### For Server Administrators

* Enable only the integrations you actually use
* Set up appropriate bypass permissions for staff
* Monitor integration performance on busy servers
* Keep all plugins updated to latest versions

#### For Players

* Understand the protection boundaries on your server
* Contact administrators if you need access to protected areas
* Report any issues with custom blocks or items

