Regions & WorldGuard#
EternalCombat protects players from escaping fights, by preventing them from entering safe zones.
How it works#
When a player is in combat and tries to enter a protected region:
- Visual Border - An animated border appears showing the region boundary
- Knockback - The player is pushed back from the region
- Message - A warning message is displayed
This prevents players from escaping fights by running to spawn or other safe zones.
Setting up protected regions#
Create a WorldGuard region
First, create your protected region using WorldGuard:
//wand
# Select two corners of your region
/rg define spawnAdd Region to configuration file
Open plugins/EternalCombat/config.yml and add your region name to the blockedRegions list:
regions:
blockedRegions:
- spawn
- safezone
- pvp-arena-lobbyReload configuration
Reload EternalCombat to apply changes:
/combatlog reloadTest the region
Tag yourself in combat and try to enter the region:
/combatlog tag YourName
# Now try to walk into the protected regionYou should be pushed back with an animated border visible.
Configuration options#
regions:
# List of blocked region names - ADD YOUR REGIONS HERE
blockedRegions:
- spawn
- safezone
# Block regions where WorldGuard has PvP disabled
preventPvpInRegions: true
# Spawn region radius if WorldGuard is not installed
restrictedRegionRadius: 10| Option | Type | Default | Description |
|---|---|---|---|
blockedRegions | list | [] | WorldGuard region names to block |
preventPvpInRegions | boolean | true | Auto-block regions with PvP disabled |
restrictedRegionRadius | int | 10 | Spawn protection radius (no WorldGuard) |
WorldGuard integration#
Automatic PvP region detection#
When preventPvpInRegions is enabled, EternalCombat will automatically block entry to:
- Regions with the
pvpflag set todeny
This means you don't need to manually add every safe region to blockedRegions.
Priority order#
If a region is in both WorldGuard (with PvP disabled) AND blockedRegions:
- blockedRegions takes priority
- WorldGuard check is secondary
Without WorldGuard#
If you don't have WorldGuard installed, EternalCombat will create a circular spawn protection zone:
regions:
# Radius of the protected spawn area
restrictedRegionRadius: 10This creates a 10-block radius protection zone around the world spawn point.
Border appearance#
The visual border that appears at protected regions can be customized:
border:
# How far players can see the border
distance: 6.5
block:
enabled: true
type: RAINBOW_GLASS
particle:
enabled: true
type: DUST
color: RAINBOWSee Configuration for all border options.
Knockback settings#
Configure how strongly players are pushed away from protected regions:
knockback:
# Knockback strength (1.0 = 2-4 blocks)
multiplier: 1
# Delay before forcing the player out
forceDelay: 1sCommon issues#
Border not showing#
- Check that
border.block.enabledorborder.particle.enabledistrue - Verify PacketEvents is installed and working
- Check
border.distanceis not set too low
Players can still enter region#
- Verify the region name is spelled correctly (exact match)
- Check that the player doesn't have
eternalcombat.bypasspermission - Ensure the world isn't in
ignoredWorlds
Region not detected#
- Make sure WorldGuard is installed and the region exists
- Try running
/rg info <region>to verify the region - Check for typos in the region name