Inactive [FUN] PvPToggle v2.2.1 - Allows players to enable or disable individual pvp status [1.3.2-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by Sleelin, May 22, 2011.

  1. Offline


    PvPToggle - PvP Toggling Plugin:
    Version: v2.1.0

    Project moved to BukkitDev
    (this thread will no longer be updated)

    Show Spoiler

    Allows players to decide whether or not they want PvP to be enabled or disabled, and stops PvP attacks when either the attacker or defender has PvP disabled. Also allows admins to toggle global or world-specific PvP, or the PvP status of a specific player, in a specific world. Muti-world compatible, Permissions combatible.

    Pretty much stated above, but hey, here they are anyway:
    • Individual, player-specific enabling or disabling of PvP
    • Global PvP control
    • World-specific PvP control
    • Permissions support - only allow certain groups or players access to specific functions
    • Multiworld support - configure which world you want the plugin to be active in
    • Cooldown timer - set time since last conflict in seconds before users can disable PvP again
    Download: here (see BukkitDev)​
    Source Code: here

    • /pvp [on|off|status] [player] [world] - Toggles or checks status of PvP for you or a specific player
    • /tpvp [on|off|status] [player] [world] - Alias for /pvp
    • /gpvp [on|off|status] [world] - Toggles or checks status of global or world-specific PvP

    • Place in your Bukkit plugins folder, run/reload once, this autogenerates a config file.
    • For each world, set logindefault to either true or false depending on whether you want it enabled or disabled for each player on login, and pvpenabled to either true or false to depending on whether you want world-wide PvP enabled or disabled on startup
    • The autogenerated config file should contain a list of all your worlds, but if it doesn't, add them manually as follows:
      • Edit the config file, and add the name of each world you run under the "worlds" parameter, in the YAML format (see sample config below).
      • In addition to entering your worlds, you must also specify whether or not you want PvP to be enabled or disabled by default. To do this, under the name of the world, enter both pvpenabled and logindefault as mentioned above (see config example below).
    • Make sure your world config files have PvP set to allowed, or this plugin won't work.
    Sample Config File:

    Replace all "----" with 4 spaces (i.e. 4 of this: " ")
    Show Spoiler
    globalDiabled: false
    cooldown: 5
    --------logindefault: true
    --------pvpenabled: false
    --------logindefault: true
    --------pvpenabled: true
    --------logindefault: false
    --------pvpenabled: false
    --------logindefault: true
    --------pvpenabled: true

    Permissions nodes:
    • pvptoggle.use
      • Enable usage of the pvptoggle plugin (i.e. status check when hit)
    • pvptoggle.command.toggle
      • /pvp [on|off]: individual pvp toggling
    • pvptoggle.command.status
      • /pvp status: check individual pvp status
    • pvptoggle.admin
      • /pvp [on|off|status] [player]: modify or check status of specific player in sender's current world
      • /pvp [on|off|status] [player] [world]: modify or check status of specific player in specified world
      • /pvp [on|off] *: modify status of all players in sender's current world
      • /pvp [on|off] * [world]: modify status of all players in specified world
    • pvptoggle.gcommand.status
      • /gpvp status: checks global pvp status
      • /gpvp status [world]: checks pvp status in specified world
    • pvptoggle.gadmin
      • /gpvp [on|off]: toggles global pvp status
      • /gpvp [on|off] [world]: toggles pvp status in specified world

    - Create automatically enable PvP on combat flag

    - Added support for Citizens NPC plugin: no longer spews console errors when players attack NPCs
    - Added option for cooldown between last conflict and disabling PvP
    - Added console support for toggling PvP status of specific players, or all players in a specific world, or across all worlds
    - Updated multiworld support to use bukkit-dependent world detection (fixes issues with misconfiguration causing errors)
    - Swapped to YAML config file format for ease of use
    Show Spoiler
    - Added persistence across player sessions
    - Fixed bug in /pvp with no arguments
    - Fixed severe errors on reload (to do with initialising players)
    - Fixed /pvp status [player] [world] - it actually works now
    - Added multiworld support
    - Tidied up command handling
    - Initial release
    AS1LV3RN1NJA likes this.
  2. Offline


    You are right about logindefault, if it is false, when the player logs in, their pvp will be disabled. It does not reset every time they relog, but I can set this up as a configurable option if you want. If a player attacks someone, the cooldown is started, otherwise they can toggle at will. Again, relogging does not affect the cooldown, so if they relog within the cooldown, they will still not be able to toggle PvP.

    For pvpenabled in each world, if it is set to false, players with the right permissions nodes will still be able to toggle their PvP status, however if they try to attack eachother, they will get a message saying that world-wide PvP is disabled. A player with the "pvptoggle.gadmin" permissions node will be able to re-enable the world-specific PvP via /gpvp on [worldname] if you wish, however on restart/reload it will be disabled again.

    for globalDisabled, if it is set to false, PvP across all worlds will be disabled, and regardless of the player-specific and world-specific PvP settings, if they try to attack eachother, they will get a message saying that global PvP has been disabled. Again, players with the "pvptoggle.gadmin" permissions node will be able to enable global PvP with /gpvp on if you wish, however again on restart/reload it will be disabled again.

    For your world, to have players log in with PvP disabled, however having world-wide PvP on, your config would look similar to below (replacing all "-"'s with spaces:
    Show Spoiler

    globalDisabled: false #allow server-wide PvP
    cooldown: 30 #just set this to the number of seconds between combat and being able to disable
    --------logindefault: false
    --------pvpenabled: true

    I hope this answers your questions adequately!
  3. Offline


    Ok, I completely understand now, and I hope others can too if they were confused! I wouldn't worry about the cooldown thing, it was just encase someone decided to log out and in to avoid the cooldown. The plugin is working great now, and everyone is having fun with it.

    If anyone else is wandering, you cannot pvp inside towns (Towny plugin), this is configurable within towny. (this confused me a little during testing ;D )
  4. Offline


    Once in awhile, people without the permission for the commands get pvp toggled off somehow, and admins need to fix them when it happens. Any reasons as to why it would do that to a player without the permissions?

    And now i just ran into an issue where admins were able to attack eachother but players couldnt attack the admins because apparently their pvp was disabled?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 15, 2016
  5. Offline


    2011-06-30 07:02:43 [INFO] [PvPToggle] Loading...
    2011-06-30 07:02:43 [INFO] [PvPToggle] Config file not found, autogenerating...
    2011-06-30 07:02:43 [INFO] [PvPToggle] found world world
    2011-06-30 07:02:43 [INFO] [PvPToggle] found and loaded world world
    2011-06-30 07:02:43 [INFO] [PvPToggle] Permissions system detected!
    2011-06-30 07:02:43 [INFO] [PvPToggle] Permissions system detected!
    2011-06-30 07:02:43 [SEVERE] Error occurred while enabling PvPToggle v0.3.1 (Is it up to date?): null
        at com.sleelin.pvptoggle.PvPToggle.onEnable(
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(
        at net.minecraft.server.MinecraftServer.e(
        at net.minecraft.server.MinecraftServer.a(
        at net.minecraft.server.MinecraftServer.init(
    An error came up :(
  6. Offline


    REQ: Please add option to load commands from CONSOLE
  7. Offline


    @spunkiie: not sure what you mean, the latest version works from console.

    @morizuki: it looks like Bukkit changed something to do with the PLAYER_JOIN event which has broken my plugin. I'm currently on holidays, but will be back in 2 weeks to solve the problem.

    EDIT: Scratch that, I think I just need to compile against the latest versions of bukkit and citizens, which I can't do until I get home.
    morizuki likes this.
  8. Offline


    I am getting this error:

    16:05:16 [SEVERE] Could not pass event ENTITY_DAMAGE to PvPToggle
    java.lang.NoClassDefFoundError: com/fullwall/Citizens/NPCs/NPCManager
        at com.sleelin.pvptoggle.PvPToggleEntityListener.onEntityDamage(
        at org.bukkit.plugin.RegisteredListener.callEvent(
        at org.bukkit.plugin.SimplePluginManager.callEvent(
        at net.minecraft.server.EntityHuman.damageEntity(
        at net.minecraft.server.EntityPlayer.damageEntity(
        at net.minecraft.server.EntityHuman.d(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
        at net.minecraft.server.NetworkManager.b(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(
    These are my settings:

    globalDiabled: false
    cooldown: 0
            logindefault: true
            pvpenabled: true
            logindefault: true
            pvpenabled: true
            logindefault: true
            pvpenabled: true
    Running PVP Toggle 0.3.1
    Running Bukkit 953
    Running Citizens 1.0.9a

    Thanks for any help =)
  9. Offline


    @Munkyman587: yeah I know, I need to recompile it with the latest versions of bukkit and Citizens. Right now it's only compatible with 935 and Citizens 1.0.8. I can recompile in a minimum of two weeks.
  10. Offline


    Alright, thanks =)
  11. Offline


    is there a chance you could add a feature where if pvp is on the players name is red (above their head) and if it is off then their name is green (again, above their head) ? would be a nice little addition :) ty
    fneyret likes this.
  12. Offline


  13. Offline


    Hum... someone can update this plugin for craftbukkit 953 ? I NEED IT :'(
  14. Offline


    @Samylots: did you read the previous comments? I am away on holidays and will be back at the end of the week to update the plugin!
  15. Offline


    Can't wait =D Needing this sooo badly =p

    Hope you enjoy your holidays!
  16. Offline


    Please update this!
    my server is makeing the map itself wethout the plugins and it keeps spaming my consol full!!!
    Please update this!
  17. Offline


    ...what? I actually have no idea what this says? This plugin doesn't touch the map?
    ohmydoddtv likes this.
  18. Offline


    globalDiabled: false
    cooldown: 0
    logindefault: false
    pvpenabled: true
    logindefault: false
    pvpenabled: true

    Does this say that when a new user logs in, they are set False for PVP? (meaning they have to toggle on to fight?) if not, correct me? I want people logging in to NOT be able to fight unless they toggle pvp on. :]
  19. Offline


    Still hoping for that update...
    ohmydoddtv likes this.
  20. Offline


    we just have to w8 it out...
  21. Offline


    I'm home now, and will be updating it tonight!
  22. Offline


  23. Offline


    When Punching a Citizen npc

    Lol just saw log for update xD

    pvp 0.3.1
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 15, 2016
  24. Offline


    Would it be possible to add a permission node to set default (or permanent if they don't have permission to change) pvp status? So that the admins on my server would have it always on? (We drop diamonds, it's unfair for us to deny it.)
  25. Offline


  26. Offline


  27. Offline


    My members say /pvp wont work for them.
  28. Offline


    Do you need to set pvp=true on the file for this to work or does the plugin ignore that?
  29. Offline


    Where i can translate it? Please help,
  30. Offline


    I have a suggestion, can you add the configuration (in config file) to avoid that a player can do "/pvp off" in a specific world?
  31. Offline


    Is there any way to change the sentence it tells Pvp is turned of for you ? I want it to be french cuz I host a french server. Thanks !

Share This Page