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.

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)

CommandDescription
/tpvp ("player") (-f)Toggle PVP for yourself or another player. -f bypasses cooldown.
/spvp <on/off> ("player") (-f)Set PVP to on or off. -f bypasses cooldown.
/worldwhitelist <set-as> <whitelist|blacklist>Set whether the world list acts as a whitelist or blacklist.
/worldwhitelist <add/remove> ["world"]Add or remove a world from the list.
/worldwhitelist <list>List all worlds in the whitelist/blacklist.
/setgracetime <"ticks"> ["player"]Set the grace period in ticks for a player.

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 other players' PVP
pacifism.others.setSet other players' PVP on/off
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:
  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

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'

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."