Skip to content

Pacifism ​

A lightweight PVP toggling plugin. Players can turn PVP on or off, with optional grace periods and cooldowns.

Requires: BukkitOfUtils

Support: Streamline Hub Discord

Why Pacifism? ​

Simple configuration, minimal setup, and very lightweight. Blocks both direct melee and projectile damage, with configurable grace periods.

Features ​

  • PVP protection — Melee and projectile damage between players is blocked when either the attacker or the target has PVP off. Ender pearls are not affected.
  • Grace period — New players start protected; after a configurable amount of play time their PVP is forced to a set state, with optional countdown commands along the way. Staff can override a player's remaining grace time with /setgracetime.
  • Toggle cool-down — Limits how often players can switch their PVP. Players with pacifism.force can bypass it with -f.
  • Explosion protection — Configured blocks (beds, TNT, respawn anchors) and entities (TNT minecarts, primed TNT, end crystals) are prevented from exploding near players who have PVP off.
  • Fire protection — Igniting blocks with flint and steel or fireballs is blocked near players who have PVP off.
  • Wind charge protection — Players with PVP off do not receive knockback from wind charges.
  • Per-world control — A world whitelist/blacklist (worlds.yml) decides which worlds Pacifism protects.
  • MySQL or SQLite storage, and Folia support.

Installation ​

  1. Install BukkitOfUtils.
  2. Download the correct version of Pacifism for your server version.
  3. Place it in your plugins folder.
  4. Restart your server.

Commands ​

Notation: <required> = mandatory, (optional) = optional, "thing" = a value you provide (e.g., player name)

CommandAliasesDescription
/togglepvp ("player") (-f)/tpvp, /pvpToggle PVP for yourself or another player. -f bypasses cooldown.
/setpvp <on/off> ("player") (-f)/spvp, /pvpsetSet PVP to on or off (true/false and 1/0 also work). -f bypasses cooldown.
/worldwhitelist set-as <whitelist|blacklist>/wwlSet whether the world list acts as a whitelist or blacklist.
/worldwhitelist <add|remove> <"world">/wwlAdd or remove a world from the list.
/worldwhitelist list/wwlList all worlds in the whitelist/blacklist.
/setgracetime <"ticks"> ("player")/sgt, /gtsetSet the remaining grace period, in ticks, for yourself or another player. This replaces the player's remaining grace time rather than adding to it.

Permissions ​

Command Permissions ​

PermissionDescription
pacifism.command.togglepvpUse /tpvp
pacifism.command.setpvpUse /spvp
pacifism.command.worldwhitelistUse /worldwhitelist
pacifism.command.setgracetimeUse /setgracetime

Modifier Permissions ​

PermissionDescription
pacifism.others.toggleToggle or set other players' PVP (required by both /tpvp and /spvp when a player is given)
pacifism.others.setTab-complete player names for /spvp
pacifism.others.gracetimeSet other players' grace time
pacifism.forceBypass cooldowns with -f

Placeholders ​

Requires PlaceholderAPI.

Time Units ​

Use these in placeholder names below: ticks, seconds, minutes, hours, days, weeks (20 ticks = 1 second).

Available Placeholders ​

PlaceholderDescriptionExample
%pacifism_gracetime_left_<unit>%Grace time remaining (integer)120
%pacifism_gracetime_left_<unit>_fancy%Grace time remaining (formatted)5 minutes
%pacifism_gracetime_left_combined%Full formatted grace time1 minute 1 second 1 tick
%pacifism_cooldown_left_<unit>%Toggle cooldown remaining (integer)7
%pacifism_cooldown_left_<unit>_fancy%Toggle cooldown remaining (formatted)3.25 seconds
%pacifism_cooldown_left_combined%Full formatted cooldown30 seconds
%pacifism_status_simple%PVP status as booleantrue / false
%pacifism_status_fancy%PVP status (configured text)ON / OFF
%pacifism_as_<player>_<placeholder>%Any of the above, for a different player%pacifism_as_Drakified_status_simple%

Config Formatting Placeholders ​

These placeholders are used inside the placeholders section of config.yml to customize how values are displayed:

PlaceholderDescription
%gracetime_left_<unit>%Grace time left (rounded down)
%gracetime_left_<unit>_full%Grace time left (with decimals)
%gracetime_left_<unit>_truncated:<places>%Grace time left (truncated to N decimal places)
%cooldown_left_<unit>%Cooldown left (rounded down)
%cooldown_left_<unit>_full%Cooldown left (with decimals)
%cooldown_left_<unit>_truncated:<places>%Cooldown left (truncated to N decimal places)

Configuration ​

config.yml ​

yaml
player:
  # Grace period — forces PVP on after a set time.
  force-toggle:
    enabled: true
    after: 18000          # Ticks until PVP is forced on (18000 = 15 minutes)
    set-as: true          # Status to set when grace period expires (true = PVP enabled)
    message: "&7&oYou seem fit to &c&lfight&8&o! &7&oWe have enabled your &c&lPVP&8&o!"
    send-message: true
    countdown:
      enabled: true
      commands:
        '6000':
          - '(message) %player_name% &7&oYou have &a&o5 &f&ominutes &7&oleft of your grace period.'
        '1200':
          - '(message) %player_name% &7&oYou have &a&o1 &f&ominute &7&oleft of your grace period.'
        '600':
          - '(message) %player_name% &7&oYou have &a&o30 &f&oseconds &7&oleft of your grace period.'
        '300':
          - '(message) %player_name% &7&oYou have &a&o15 &f&oseconds &7&oleft of your grace period.'
        '100':
          - '(message) %player_name% &7&oYou have &a&o5 &f&oseconds &7&oleft of your grace period.'
        '80':
          - '(message) %player_name% &a&o4 &f&oseconds&7&o...'
        '60':
          - '(message) %player_name% &a&o3 &f&oseconds&7&o...'
        '40':
          - '(message) %player_name% &a&o2 &f&oseconds&7&o...'
        '20':
          - '(message) %player_name% &a&o1 &f&osecond&7&o...'
  toggle:
    cool-down:
      enabled: true
      ticks: 600            # 30 seconds between toggles

explosions:
  block-near-pacifist:
    radius: 15              # Radius checked for PVP-off players when a listed block explodes
  materials:
    list:
      - 'WHITE_BED'
      - 'ORANGE_BED'
      - 'MAGENTA_BED'
      - 'LIGHT_BLUE_BED'
      - 'YELLOW_BED'
      - 'LIME_BED'
      - 'PINK_BED'
      - 'GRAY_BED'
      - 'LIGHT_GRAY_BED'
      - 'CYAN_BED'
      - 'PURPLE_BED'
      - 'BLUE_BED'
      - 'BROWN_BED'
      - 'GREEN_BED'
      - 'RED_BED'
      - 'BLACK_BED'
      - 'TNT'
      - 'RESPAWN_ANCHOR'
    is-blacklist: false
    radius: 15
  entities:
    list:
      - 'MINECART_TNT'
      - 'PRIMED_TNT'
      - 'ENDER_CRYSTAL'
    is-blacklist: false
    radius: 15

fire:
  near-pacifist:
    radius: 2               # Flint-and-steel / fireball ignition is blocked within this radius of a PVP-off player

placeholders:
  gracetime:
    left:
      negatives:
        replace: true
        replace-to: 0
      ticks:
        simple: "%gracetime_left_ticks%"
        fancy: "&a%gracetime_left_ticks% &fticks"
      seconds:
        simple: "%gracetime_left_seconds%"
        fancy: "&a%gracetime_left_seconds% &fseconds"
      minutes:
        simple: "%gracetime_left_minutes%"
        fancy: "&a%gracetime_left_minutes% &fminutes"
      hours:
        simple: "%gracetime_left_hours%"
        fancy: "&a%gracetime_left_hours% &fhours"
      days:
        simple: "%gracetime_left_days%"
        fancy: "&a%gracetime_left_days% &fdays"
      weeks:
        simple: "%gracetime_left_weeks%"
        fancy: "&a%gracetime_left_weeks% &fweeks"
      combined:
        fancy: "%weeks% %days% %hours% %minutes% %seconds% %ticks%"
        sections:
          only-show-if-not-zero: true
          weeks: "&a%amount% &fweeks"
          days: "&a%amount% &fdays"
          hours: "&a%amount% &fhours"
          minutes: "&a%amount% &fminutes"
          seconds: "&a%amount% &fseconds"
          ticks: "&a%amount% &fticks"
  cooldown:
    left:
      negatives:
        replace: true
        replace-to: 0
      ticks:
        simple: "%cooldown_left_ticks%"
        fancy: "&a%cooldown_left_ticks% &fticks"
      seconds:
        simple: "%cooldown_left_seconds%"
        fancy: "&a%cooldown_left_seconds% &fseconds"
      minutes:
        simple: "%cooldown_left_minutes%"
        fancy: "&a%cooldown_left_minutes% &fminutes"
      hours:
        simple: "%cooldown_left_hours%"
        fancy: "&a%cooldown_left_hours% &fhours"
      days:
        simple: "%cooldown_left_days%"
        fancy: "&a%cooldown_left_days% &fdays"
      weeks:
        simple: "%cooldown_left_weeks%"
        fancy: "&a%cooldown_left_weeks% &fweeks"
      combined:
        fancy: "%weeks% %days% %hours% %minutes% %seconds% %ticks%"
        sections:
          only-show-if-not-zero: true
          weeks: "&a%amount% &fweeks"
          days: "&a%amount% &fdays"
          hours: "&a%amount% &fhours"
          minutes: "&a%amount% &fminutes"
          seconds: "&a%amount% &fseconds"
          ticks: "&a%amount% &fticks"
  status:
    pvp-off:
      simple: "%status_pvp%"
      fancy: "&c&lOFF"
    pvp-on:
      simple: "%status_pvp%"
      fancy: "&a&lON"

database:
  type: 'SQLITE'           # MYSQL or SQLITE
  host: 'localhost'
  port: 3306
  username: 'root'
  password: 'password'
  table-prefix: 'pacifism_'
  database: 'pacifism'
  sqlite-file-name: 'pacifism.db'

For block explosions, the radius under explosions.block-near-pacifist is the one used; entity explosions use explosions.entities.radius.

The countdown.commands keys are the number of grace ticks remaining when the commands run. Besides PlaceholderAPI placeholders, these commands support %player_name%, %player_uuid%, %player_ticks%, %player_ticks_left%, and %set_as%.

worlds.yml ​

Controls which worlds Pacifism protects. Manage it in-game with /worldwhitelist, or edit it directly.

yaml
# false = blacklist (protect every world except those listed)
# true = whitelist (protect only the listed worlds)
whitelist: false
list: []

With the default (an empty blacklist), every world is protected.

messages.yml ​

yaml
status:
  enabled: "&aenabled"
  disabled: "&cdisabled"

# Set any message to "" to disable it.

toggle:
  success:
    self:
      self: "&eYou have %status% &eyour PVP&8!"
      upon:
        enable: "&7(You will be able to take damage from other players.)"
        disable: "&7(You will not be able to take damage from other players.)"
    other:
      self: "&eYou have %status% &b%player_name%&e's PVP&8!"
      other: "&eYour PVP has been %status% &eby &b%player_name%&8!"
      upon:
        enable: "&7(They will be able to take damage from other players.)"
        disable: "&7(They will not be able to take damage from other players.)"
  cannot:
    self:
      self: "&cYou cannot toggle your PVP&8!"
      time-left: "&cYou have &f%cooldown_left_seconds% &cseconds left before you can toggle your PVP again&8!"
    other:
      self: "&cYou cannot toggle &b%player_name%&c's PVP&8!"
      time-left: "&cThey have &f%cooldown_left_seconds% &cseconds left before they can toggle their PVP again&8!"

set:
  success:
    self:
      self: "&eYou have %status% &eyour PVP&8!"
      upon:
        enable: "&7(You will be able to take damage from other players.)"
        disable: "&7(You will not be able to take damage from other players.)"
    other:
      self: "&eYou have %status% &b%player_name%&e's PVP&8!"
      other: "&eYour PVP has been %status% &eby &b%player_name%&8!"
      upon:
        enable: "&7(They will be able to take damage from other players.)"
        disable: "&7(They will not be able to take damage from other players.)"
  cannot:
    self:
      self: "&cYou cannot toggle your PVP&8!"
      time-left: "&cYou have &f%cooldown_left_seconds% &cseconds left before you can toggle your PVP again&8!"
    other:
      self: "&cYou cannot toggle &b%player_name%&c's PVP&8!"
      time-left: "&cThey have &f%cooldown_left_seconds% &cseconds left before they can toggle their PVP again&8!"

set-grace-time:
  success:
    self:
      self: "&eYou have set your grace-time to &b%gracetime_left_seconds% &eseconds&8!"
    other:
      self: "&eYou have set &b%player_name%&e's grace-time to &b%gracetime_left_seconds% &eseconds&8!"
      other: "&eYour grace-time has been set to &b%gracetime_left_seconds% &eseconds&8!"

pvp:
  disabled:
    self: "&cYou have PVP disabled! You cannot hurt other players."
    other: "&cThat player has PVP disabled! You cannot hurt them."

fire:
  near-pacifist: "&cYou cannot ignite a block near a pacifist player"

Messages support %player_name% and %status% (the status.enabled / status.disabled text), plus Pacifism's own placeholders written without the pacifism_ prefix (for example %cooldown_left_seconds%) and any PlaceholderAPI placeholder. The pvp.disabled messages also support %damager_name%, %damager_display_name%, %damaged_name%, and %damaged_display_name%.