TogglePvp icon

TogglePvp -----

Allow players to toggle their own PVP!



This is a lightweight plugin for servers that want to allow PVP only for those who want it. perfect for Survival/Skyblock servers.

TogglePvp.png

How does it work?
In order for players to be able to PVP one another, they need to both have their PVP enabled via the /pvp command.

What about bows/potions?
In the instance of an Arrow hitting a user when one of them has PVP disabled, It will simply get deleted and the damage (Including fire) canceled.
In the instance of potions splashing it is somewhat more complex. Rather than just deleting all potions, it will cancel the effect of a potion deemed "Offencive" Eg. Weakness, Poison or Damage.
Secondly, It only removes the effect from players with PVP disabled.
This is better than just deleting the potion as that would cause problems in the event that someone accidentally hit a friendly and get their hard-worked for potion deleted.

What About Tamed Animals?
Yep. It supports that too!
It also has the option to protect tamed creatures against damage from other players' and tamed wolves (when the owner has PvP disabled or is offline)

Explosions, Lava and Fire?
You guessed it, It sure does.​


Commands
  • /pvp, togglepvp, pvptoggle, pvpt, tpvp
    on, start
    - Activates your PVP
    off, stop
    - Deactivates your PVP
    toggle, <none>
    - Toggles your PVP
  • /togglePvpReload
    Reloads Config file.
  • /togglePvpGetWorld
    Gets the name of the world that you're in.
Permissions
Note:
Permissions are Configurable
  • tau.togglepvp.use
    Grants ability to use the /pvp command.
  • tau.togglepvp.flightbypass
    Bypass combat flight restrictions
  • tau.togglepvp.reload
    Grants ability to use the reload & getworld command.
WorldGuard Flags
  • togglepvp-force-pvp
    Force enables PVP in a Region
Placeholders
  • %togglepvp_state%
    The player's PvP state.
  • %togglepvp_remainingtime%
    Remaining time before player can change PvP states after combat.

Code (Text):

# TogglePvp By TauCubed < [email protected]>

# The permission players need to toggle pvp
Toggle Permission: 'tau.togglepvp.use'

# The permission players need to /togglepvpreload
Reload Permission: 'tau.togglepvp.reload'

# The delay before a player can toggle their pvp after entering combat
Delay: 10.0

# Should this plugin allow pvp by default?
Default Pvp State: false

# Only works on 1.14+
# Stores the pvp state in the player's NBT
Enable Persistent Pvp State: true

# Worlds where PVP is forcefully enabled.
Force PVP Enabled Worlds:
- 'pvp_world'
- 'Example_World'
- 'Another_Example_World'

# Commands that will run from console when someone turns on pvp
# %player% will be replaced with the players name
Pvp Enabled Commands: []

# Commands that will be blocked from execution while a players' combat timer is active
# All commands should be lowercase
Blocked Combat Commands: []
#  - "/somecommand"
#  - "/someothercommand"
#  - "/etcetc"

# What potion effects should be considered an attack?
# A full list of supported potions can be found Here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
# Note: Don't include potion effects such as Instant Damage as that deals damage directly and will be ignored here.
Banned Potion Effects:
- 'POISON'
- 'WITHER'
- 'BLINDNESS'
- 'CONFUSION'
- 'HUNGER'
- 'SLOW'
- 'SLOW_DIGGING'
- 'UNLUCK'
- 'WEAKNESS'

# Should this plugin protect tamed animals when their owner has PVP disabled or is offline?
Protect Tameable Animals: true

# Should this plugin protect players with PVP disabled from unknown explosions?
# An explosion is unknown when the plugin cannot determine who caused it.
Protect From Unknown Explosions: false

# Should this plugin prevent players from placing fire/lava near players with pvp disabled?
Protect From Player Hazards: true

# Should attackers get knocked back when they attempt to PVP someone with PVP disabled?
Enable Knockback: true
# Set the knockback force
Knockback Force: 0.5F

############
# Messages #
############

# The message to be sent to the player when they try to run a blocked command while in combat
Blocked Combat Command Message: " &c>> &7This command is disabled during combat"

# The message to send to a player that attacks a tamed animal when the owner of that animal is offline
Animal Owner Offline: " &c>> &7You may not attack this Animal as it's owner is offline."

# What message should be sent to players when they toggle their pvp in a forcefully enabled world?
# NOTE: This does not prevent people from toggling. It simply serves as a warning message.
MSG In PVP Enabled World ON Pvp CMD: " &c>> &8&oWarning: &r&7pvp is forcefully enabled in this world."

# What message should be sent to players to instruct them on how to use this plugin?
MSG Usage:
- " &c>> &7Usage: /&bpvp &3on&7, &3enable&7, &3start&7/&3stop&7, &3disable&7, &3off"
- " &c>> &7Toggle Usage: /&bpvp"

# What message should be sent to players that attempt to toggle their pvp while in combat?
# You may use the placeholders %remainingtime%
MSG CombatTagged:
- " &c>> &7You cannot toggle your pvp while in &ccombat"
- " &c>> &7You must wait &b%remainingtime%&7 seconds before toggling again"

# What messages should be sent to players who attempt to set their pvp state to an existing state?
MSG Pvp is Already DISABLED: " &4>> &7Your pvp is already &cDisabled"
MSG Pvp is Already ENABLED: " &4>> &7Your pvp is already &aEnabled"

# What messages should be sent to players when their pvp state changes?
MSG Pvp DISABLED: " &8>> &7Your pvp has been &cDisabled"
MSG Pvp ENABLED: " &8>> &7Your pvp has been &aEnabled"

# Should messages be sent to attackers when they use non-melee attacks? (Bows, Potions, Explosives etc)
Send PVP Disabled Messages On Non-Melee: true

# The Message that will be sent to the attacker when either the attacker or the victim have PVP disabled
MSG Attack Blocked BASE: " &c>> &7You may not pvp &b%player% &7because"

# The message to send after the BASE message when both the attacker and the victim have PVP disabled.
MSG Attack Blocked Both Players Disabled: " &c>> &7both &byou &7and &b%player%&7 have pvp &cDisabled"
# The message to send after the BASE message when the attacker has PVP disabled.
MSG Attack Blocked You Disabled: " &c>> &7you have pvp &cDisabled"
# The message to send after the BASE message when the victim has PVP disabled.
MSG Attack Blocked Other Player Disabled: " &c>> &b%player%&7 has pvp &cDisabled"

# When set above 0 it will be used to limit how often attack blocked messages can be sent
Attack MSG Cooldown: 1.0

# State effects are effects that are applied to a player depending on their pvp state
State Effects:
  enabled: false
  # what colors should players glow depending on their pvp state
  # For a list of colors see: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/ChatColor.html
  # set to "" to disable glowing
  pvp glow color: "RED"
  pve glow color: ""
  # how should a players name be displayed in tab depending on their pvp state
  # use "" to disable
  pvp tab name: "&c%name%"
  pve tab name: ""

#Misc Advanced Messages

# miscellaneous messages
Misc:
  No Permission: " &4>> &7no permission"
  ConsoleIsNotPlayer: " &4>> &&Console is not a player."
  Reload: " &8>> &aTogglePvp &7reloading"
  Reloading: " &8>> &aTogglePvp &7reloaded"
  ConsoleCannotPvp: " &4>> &7Console can't toggle pvp."

# section for manipulating PAPI placeholders
placeholders:
  # the following two values are for the %togglepvp_state% placeholder
  pvp enabled: "Enabled"
  pvp disabled: "Disabled"

########################
# END of Configuration #
########################

# No Touchy
Config Version: 10
 


Features

Allows Player to toggle their PVP on and off.
Prevents toggling when in combat.
Multi-World Support
WorldGuard Support
Disable flight of users while in combat.
Disable specific commands while in combat.
Glow Effects based on PVP state
You can configure almost everything to your liking.
Simple and easy to use.
PlaceholderAPI support​

Why not check out my other resources?

if you have an issue, please don't use the reviews for it. Just send me a message or write it in discussion. Remember: This plugin is free. I have a Job. keep that in mind.

[​IMG]
Resource Information
Author:
----------
Total Downloads: 18,978
First Release: Aug 1, 2017
Last Update: Mar 11, 2023
Category: ---------------
All-Time Rating:
37 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings