Перейти к содержимому
Mineforgian

ZPvPToggle

Zepsi's PvPToggle. A simple PvP Toggle plugin. Let players choose if they want to be vulnerable to PvP.

Загрузки
521
Подписчики
1
Обновлён
30 сентября 2025 г.
Лицензия
MIT

Опубликован 14 апреля 2025 г.

Исходный код

ZPvPToggle

A lightweight Minecraft plugin that allows players to toggle their PvP status on and off. Players can only engage in PvP when both parties have PvP enabled.

ZPvPToggle API Version Folia Support

Features

  • Toggle PvP: Players can enable or disable their PvP status
  • Visual Indicators: Customizable particle rings show which players have PvP enabled
  • Cooldowns: Configurable cooldown for toggling PvP after a player enters PvP combat.
  • Custom Indicators: Players can choose their own indicators. Access to indicators is permission-based.
  • Admin Controls: Staff can toggle PvP for other players
  • Fully Customizable: All messages and particle effects can be configured
  • Folia Support: Works with Folia server software
  • Permissions-Based: Granular permission system for different commands

Commands

Command Description Permission
/pvp Toggle your PvP status zpvptoggle.user
/pvp toggle Toggle your PvP status zpvptoggle.user
/pvp on Enable your PvP status zpvptoggle.user
/pvp off Disable your PvP status zpvptoggle.user
/pvp hide Hide PvP particle indicators zpvptoggle.user
/pvp show Show PvP particle indicators zpvptoggle.user
/pvp indicator <indicator> Change your PvP indicator zpvptoggle.indicator.
/pvp help Display the help message zpvptoggle.user
/pvp reload Reload plugin configuration zpvptoggle.admin
/pvp <player> Toggle PvP for another player zpvptoggle.admin
/pvp bypass <player> Toggle PvP Bypass status for you or another player zpvptoggle.admin

Permissions

Permission Description Default
zpvptoggle.user Allows players to toggle their own PvP status true
zpvptoggle.indicator.<indicator> Give access to specific indicators. multiple
zpvptoggle.admin Allows staff to toggle PvP status for other players op

Configuration

config.yml

# Whether to disable PvP when a player dies
disable-pvp-on-death: true
# Whether to show a warning message when a player first toggles PvP
warning-message-enabled: true
# Whether to apply pvp-toggle protections to pets of players too
protect-pets: true
# Duration of the cooldown for players toggling pvp or since their last pvp interaction
pvp-cooldown: 10.0

particle-indicator:
  # Interval in ticks to show the ring of particles. 20 ticks = 1 second.
  interval-ticks: 60
  # Maximum distance (in blocks) at which players can see PvP indicators.
  max-view-distance: 32
  # The default indicator to use (must match one of the keys in the indicators section)
  default-indicator: default
  # Define multiple particle ring indicators
  indicators:
    # Default ring - red circle around feet
    default: 
      type: REDSTONE
      points: 32
      random-particle-positions: false
      radius: 0.8
      y-offset: 0.1
      interval: 5
      random-offset-vertical: 0.0
      random-offset-horizontal: 0.0
      speed: 0.01
      color: RED
      dust-size: 1.0

Compatibility

  • Paper 1.21+
  • Folia-compatible
  • Java 21+

Dependencies

Installation

  1. Download the latest version of ZPvPToggle from Modrinth.
  2. Download MCKotlin from Modrinth
  3. Place the downloaded .jar files into your server's plugins/ folder.
  4. Restart your server.
  5. Configure the plugin to your liking by editing the .yml files in the plugins/ZPvPtoggle/ folder.

Ченджлог

1.8Релиз26.1.1, 26.1.2, 26.2 · 30 сентября 2025 г.
  • Added Fishing-rod attacks as something protected by the pvp-toggle
  • Fixed minor bugs
1.7Релиз1.21.6, 1.21.7, 1.21.8 · 28 сентября 2025 г.

Added /pvp bypass command

  • Accessible with "zpvptoggle.admin" perm.
  • The command toggles whether PvP-toggle restrictions apply to you.
  • If you have PvP bypass enabled, you can attack other players and their pets without them having PvP enabled.
  • Set other player's pvp-bypass status with /pvp bypass [player]
1.4Релиз1.21.6, 1.21.7, 1.21.8 · 24 апреля 2025 г.

Features added:

  • Extend pvp-toggle protections to pets of players.
  • Configurable cooldown for toggling pvp depending on whether the player is actively in PvP combat.
1.3Релиз1.21.3, 1.21.4, 1.21.5 · 23 апреля 2025 г.

Features added:

  • MariaDB/MySQL support.
  • Indicator choice saves between sessions for players.
  • /pvp <show/hide> --own command to let players hide their own indicator from themself.
  • Indicator visibility saves between sessions for players.
1.2Релиз1.21.3, 1.21.4, 1.21.5 · 20 апреля 2025 г.

New features:

  • Per-player indicators
  • Protections extend to end-crystals, bed-explosions, wind-charge, harmful potions, respawn anchor explosions
  • More configurability of messages.yml and config.yml

Sidenotes:

  • To accomodate for changes, I had to update the plugins API to 1.21.
1.1Релиз1.21.3, 1.21.4, 1.21.5 · 15 апреля 2025 г.

Optimized logic

Комментарии

Загружаем…