PvPManager

repository·master·Indexed 41 days ago

https://github.com/chancesd/pvpmanager

A high-performance Minecraft plugin for Spigot/Bukkit servers designed to manage combat mechanics, player protection, and server administration. Features include combat tagging, combat logging prevention, newbie protection, and an API for developers (version 4.0.8). It provides comprehensive tools for controlling PvP environments, managing inventory on death, and integrating with PlaceholderAPI and WorldGuard.

Tokens
4.9K
Snippets
24
Records
30
Agent score
48%

What's inside PvPManager

  1. Overview of PvPManager features

    master

    PvPManager is a comprehensive PvP management plugin for Spigot/Bukkit servers. It provides tools for combat mechanics, player protection, and server administration. Key capabilities include:

    Combat Management

    • PvP Toggling: Control PvP for individual players, specific worlds, or the entire server.
    • Combat Tagging: Implement combat timers with visual indicators (Action Bar/Boss Bar).
    • Combat Restrictions: Disable actions like flying, changing gamemode, or executing certain commands while in combat.
    • Combat Logging Prevention: A flexible punishment system for players who disconnect during combat.

    Player Protection

    • Newbie Protection: Protect new players from being targeted.
    • Safety Protections: Protect players during respawn and teleportation.
    • Anti-Abuse: Prevent "border hopping" (fleeing to safezones during combat) and KDR abuse via configurable kick thresholds.

    Economy and Inventory

    • Rewards/Penalties: Configure money rewards, penalties, and custom commands triggered by kills.
    • Inventory Handling: Manage how items are handled on death (keep, drop, or transfer to the killer).
    • Item Cooldowns: Implement item-specific cooldown systems.

    Integrations

    • PlaceholderAPI: Support for dynamic placeholders.
    • Plugin Support: Integrates with WorldGuard, Citizens, and more.
  2. Add PvPManager to a Maven project

    master

    To use the PvPManager API in your own Java project, add the CodeMC repository and the PvPManager dependency to your pom.xml file. Note that the scope is set to provided as the plugin will be present in the server environment at runtime.

    <repository>
        <id>CodeMC</id>
        <url>https://repo.codemc.org/repository/maven-public/</url>
    </repository>
    
    <dependency>
        <groupId>me.chancesd.pvpmanager</groupId>
        <artifactId>pvpmanager</artifactId>
        <version>4.0.8</version>
        <scope>provided</scope>
    </dependency>
  3. Manage world PvP settings with /pmr worlds

    master

    The /pmr worlds command provides a control panel to manage PvP settings for specific worlds.

    Usage for Players: Running /pmr worlds in-game opens an interactive GUI menu that displays:

    • The current world name.
    • Player statistics (Total players, players in combat, players with PvP enabled/disabled).
    • Interactive buttons to toggle PvP (Enables/Disables PvP) and Force PvP (Forces a state or leaves it neutral).

    Usage for Console: Console users cannot access the interactive menu and must use subcommands like /pmr worlds list to view information.

    /pmr worlds
  4. View the PvPManager help menu

    master

    The help menu provides a categorized list of available commands, including Player commands and Staff commands. The menu is interactive: you can click on commands to either execute them directly (if they have no parameters) or view their usage syntax (if they require parameters).

    Commands are categorized and color-coded:

    • Player Commands: Green (#4CAF50)
    • Staff Commands: Orange (#FF5722)
    • PMR Subcommands: Orange (#FF5722)

    Navigation through pages in the help menu is handled via the /pmr prefix.

  5. Use the PvPManager administration commands (/pmr)

    master

    The /pmr command is the primary entrypoint for managing PvPManager. It supports several subcommands for administration, maintenance, and debugging. If no subcommand is provided, running /pmr or /pmr [page] will display the help menu.

    Permissions: Most administrative subcommands require the Permissions.ADMIN permission.

    # View help menu
    /pmr
    
    # View specific help page
    /pmr 2
  6. Check newbie protection time

    master

    Check how much time remains before newbie protection expires.

    Command: /newbie checktime [player]

    Usage Patterns:

    • Self-check: /newbie checktime (Run by a player to see their own remaining time).
    • Admin-check: /newbie checktime <player> (Requires pvpmanager.command.newbie permission to check other players).

    Note: If a console user attempts to use this without a player argument, it will return an error.

    /newbie checktime
    # or
    /newbie checktime <player>
  7. Add or remove newbie protection (Admin)

    master

    Administrators can manually force newbie protection status on any player.

    Commands:

    • /newbie add <player>: Grants newbie protection to the specified player. If they already have it, an error is returned.
    • /newbie remove <player>: Removes newbie protection from the specified player. If they do not have it, an error is returned.

    Requirement: Requires the pvpmanager.command.newbie permission.

    /newbie add <player>
    /newbie remove <player>
  8. Reference: World PvP options and values

    master

    When using the /pmr worlds set command, use the following exact tokens for options and values:

    OptionValid ValuesDescription
    PvPON, OFFEnables or disables the ability for players to engage in PvP.
    ForcePvPON, OFF, NONEON: Forces PvP enabled (blocks players from turning it off).<br>OFF: Forces PvP disabled (blocks players from turning it on).<br>NONE: Neutral state (leaves player state as is).