PvPToggleX is a versatile and lightweight Minecraft plugin designed to give server administrators complete control over PvP (Player vs. Player) combat. Whether you need to toggle PvP globally, per dimension, or set up automatic intervals, PvPToggleX handles it all. It also includes smart features like lava placement restrictions to prevent griefing when PvP is disabled.
- Global PvP Control: Toggle PvP on or off for the entire server with a single command.
- Dimension-Specific Control: Manage PvP settings independently for the Overworld, Nether, and End.
- Timed Delays: Schedule PvP changes to happen after a set delay (e.g., enable PvP in 10 seconds).
- Automatic Toggling: Set up recurring intervals where PvP automatically switches on and off (useful for event servers).
- Anti-Griefing: Automatically blocks players from placing lava buckets near others when PvP is disabled.
- Fully Configurable: Customize all messages, default intervals, and safety checks via
config.yml.
- Download the
PVPtoggleX-1.0.jarfile. - Place the JAR file into your server's
pluginsfolder. - Restart your server.
- Edit
plugins/PvPToggleX/config.ymlto customize settings if desired. - Run
/pvptogglex reloadto apply changes.
/pvp <on|off> [time]- Turn PvP on or off for all worlds. Optional[time]argument delays the action by X seconds./pvptoggle <time> | /pvptoggle off- Start an automatic toggle loop every X seconds, or stop it.
/pvpoverworld <on|off> [time]- Toggle PvP for the Overworld./pvpnether <on|off> [time]- Toggle PvP for the Nether./pvpend <on|off> [time]- Toggle PvP for the End.
/pvptoggleoverworld <time> | off- Auto-toggle loop for Overworld./pvptogglenether <time> | off- Auto-toggle loop for Nether./pvptoggleend <time> | off- Auto-toggle loop for End.
/pvptogglex reload- Reloads the plugin configuration.
pvptoggle.use- Allows access to all PvPToggleX commands (Default: OP).
The config.yml allows you to tweak various aspects of the plugin:
# The interval in seconds for automatic PvP toggling.
toggleInterval: 0
# Disable lava placement when PvP is disabled to prevent griefing
disable-lava: true
# Radius in blocks to check for nearby players when placing lava
lava-radius: 2
# Messages
messages:
pvp-immediate: "PvP is now §f{state}§r!"
# ... and many more customizable messagesTo build this project locally, you will need JDK 17 or higher and Maven.
- Clone the repository:
git clone https://github.com/yourusername/PVPtoggleX.git cd PVPtoggleX - Build with Maven:
mvn clean package
- The compiled JAR will be in the
target/directory.
This project is licensed under the MIT License - see the LICENSE file for details.