DUXPLIMA Documentation

Barrier

How tagged players are kept out of safe zones, the glass wall they see, and the punishments for hitting it.

The barrier stops a tagged player from escaping a fight by running into a safe zone: a WorldGuard region with PvP off, or a GriefPrevention or uxmClaims claim (see Safe zones). Two modules make it up:

ModuleFileDoes
Barrierconfigs/combattag/BarrierSettings.ymlBlocks the way in and draws the wall
BarrierPunishmentsconfigs/combattag/BarrierPunishments.ymlPunishes players who keep hitting the wall

Both need the CombatTag module. A player who is not tagged walks in and out of safe zones freely.

What a tagged player meets

The playerHappens
Walks or jumps into a safe zoneThe move is cancelled, the player is pushed back, a sound plays and a short glass wall flashes in front of them
Rides a horse, boat or minecart into oneThey are thrown off and pushed back
Gets into a vehicle standing in oneRefused, with message
Teleports into one, by pearl, command or anything elseRefused, with message
Comes near the edge of a safe zoneA red glass wall appears along the edge, within radius blocks
Hits or right-clicks that glassPushed back, with the interaction sound and message. Counts as a touch for the punishments
Was already inside a safe zone when tagged and tries to moveTeleported to the nearest spot outside, within 10 blocks

The glass is fake: only the tagged player sees it, other players see the real blocks, and it disappears when the tag ends. With blockTypeCheck on, it is drawn only where the real block is air or another block you can walk through.

border.mode

ModeMovement blockedGlass wall shown
BOTH (default)YesYes
INVISIBLEYesNo, only the short flash when stopped
PHYSICALNo, the server does not checkYes
NONENoNo

PHYSICAL relies on the player's game client respecting the fake glass. A modified client walks through it, so use BOTH or INVISIBLE when the barrier must hold.

BarrierSettings.yml

KeyDefaultMeaning
enabledtrueTurns the barrier on or off
message"You cannot enter a safe zone while in combat."Sent when a teleport or vehicle is refused
priorityLOWWhen the plugin handles teleports
disabledWorldsemptyWorlds without a barrier
useBypassPermissionfalseWhether bypassPermission is checked
bypassPermissionuxmpvpcore.bypass.barrierPlayers with it may enter safe zones while tagged
border.modeBOTHSee above
border.radius3How far around the player the glass wall is drawn, in blocks
border.knockbackStrength0.5How hard a stopped player is pushed back
border.visuals.enabledtrueDraw the glass at all. Off, no wall is ever shown and touching it cannot happen
border.visuals.materialRED_STAINED_GLASSThe block the wall is made of
border.visuals.blockTypeChecktrueDraw only where the real block is passable
border.visuals.dimensions.widthRadius2Half the width of the wall that flashes when stopped: 2 makes it 5 blocks wide
border.visuals.dimensions.heightRadius1Half its height: 1 makes it 3 blocks high
interaction.cooldownMs500Touches closer together than this count once
interaction.message"You cannot break the barrier."Sent when the glass is hit
effects.enabledtrueEnder and smoke particles where the player was stopped
sounds.denySoundentity.villager.noWhen stopped
sounds.interactionSoundentity.iron_golem.hurtWhen the glass is hit
sounds.knockbackSoundentity.player.hurtNot played in 2.0.0

Each sound has name, volume and pitch. The name is a Minecraft sound key.

border:
  mode: BOTH
  radius: 4
  knockbackStrength: 0.8
  visuals:
    enabled: true
    material: ORANGE_STAINED_GLASS
sounds:
  denySound:
    name: block.note_block.bass
    volume: 1.0
    pitch: 0.5

Punishments for touching the glass

File: BarrierPunishments.yml. A touch is a hit or a right-click on the glass wall; walking into the safe zone does not count. The plugin counts each player's touches, and steps says what happens at a given count.

KeyDefaultMeaning
enabledtrueTurns the punishments on or off
resetOnQuittrueThe count starts again when the player leaves
resetOnTagExpiretrueThe count starts again when the tag ends
steps3 and 5What happens at which touch

Each step has:

KeyMeaning
punishmentsThe list of punishments for this step
messageThe text for MESSAGE
effectDurationSeconds for BLIND, SLOW and POISON
damageDamage for DAMAGE, in half hearts: 1.0 is half a heart
PunishmentDoes
MESSAGESends the step's message
DAMAGEDeals damage. Never kills: if the hit would leave less than 0.2 health, it deals nothing
BLINDBlindness for effectDuration seconds
SLOWSlowness II for effectDuration seconds
POISONPoison for effectDuration seconds
REFRESH_TAGStarts the combat tag again at full duration
TELEPORT_TO_ENEMYTeleports the player to their last attacker
LIGHTNING_STRIKEA lightning flash on the player, without damage
UPSIDE_DOWNLevitation and nausea. Here effectDuration is in ticks, not seconds: 60 is 3 seconds

Only the exact counts in steps do something; touches in between do nothing. After the highest step the next touch starts the count again from zero.

The defaults: the 3rd touch blinds for 3 seconds with a warning, the 5th deals half a heart of damage. A harder example:

steps:
  2:
    punishments: [MESSAGE, SLOW]
    message: "<yellow>Stay out of the safe zone."
    effectDuration: 5
  4:
    punishments: [MESSAGE, DAMAGE, REFRESH_TAG]
    message: "<red>Last warning."
    damage: 4.0
  6:
    punishments: [MESSAGE, TELEPORT_TO_ENEMY, LIGHTNING_STRIKE]
    message: "<dark_red>Back to the fight."

Changes apply with /pvpcore reload BarrierPunishments; the barrier itself reloads with /pvpcore reload Barrier.

Related: Combat Tag, hooks.yml