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

    Sleelin

    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.

    Features:
    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

    Commands:
    • /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
    Installing:

    • 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
    worlds:
    ----world:
    --------logindefault: true
    --------pvpenabled: false
    ----testing:
    --------logindefault: true
    --------pvpenabled: true
    ----herp:
    --------logindefault: false
    --------pvpenabled: false
    ----derp:
    --------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
    To-Do:


    - Create automatically enable PvP on combat flag

    Changelog:
    v0.3.1:
    - Added support for Citizens NPC plugin: no longer spews console errors when players attack NPCs
    v0.3.0:
    - 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
    v0.2.5:
    - 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
    v0.2.3:
    - Added persistence across player sessions
    - Fixed bug in /pvp with no arguments
    v0.2.1:
    - Fixed severe errors on reload (to do with initialising players)
    - Fixed /pvp status [player] [world] - it actually works now
    v0.2.0:
    - Added multiworld support
    - Tidied up command handling
    v0.1.0:
    - Initial release
     
    AS1LV3RN1NJA likes this.
  2. Offline

    Sleelin

    @amunro:
    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
    worlds:
    ----[worldname]:
    --------logindefault: false
    --------pvpenabled: true


    I hope this answers your questions adequately!
     
  3. Offline

    amunro

    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

    Monkz

    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

    morizuki

    Code:
    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
    java.lang.NullPointerException
        at com.sleelin.pvptoggle.PvPToggle.onEnable(PvPToggle.java:71)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:799)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:140)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    An error came up :(
     
  6. Offline

    spunkiie

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

    Sleelin

    @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

    Munkyman587

    I am getting this error:
    http://pastebin.com/LQjjXpx4

    Code:
    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(PvPToggleEntityListener.java:28)
        at org.bukkit.plugin.java.JavaPluginLoader$55.execute(JavaPluginLoader.java:628)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:423)
        at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:179)
        at net.minecraft.server.EntityHuman.d(EntityHuman.java:561)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:856)
        at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    These are my settings:
    http://pastebin.com/mEku0V3t

    Code:
    globalDiabled: false
    cooldown: 0
    worlds:
        world:
            logindefault: true
            pvpenabled: true
        world_nether:
            logindefault: true
            pvpenabled: true
        BraveNewWorld:
            logindefault: true
            pvpenabled: true
    Running PVP Toggle 0.3.1
    Running Bukkit 953
    Running Citizens 1.0.9a

    Thanks for any help =)
     
  9. Offline

    Sleelin

    @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

    Munkyman587

    Alright, thanks =)
     
  11. Offline

    scrub88

    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

    razu

  13. Offline

    Samylots

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

    Sleelin

    @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

    Munkyman587

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

    Hope you enjoy your holidays!
     
  16. Offline

    ItsQ

    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

    Sleelin

    ...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
    worlds:
    world:
    logindefault: false
    pvpenabled: true
    world_nether:
    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

    Munkyman587

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

    ItsQ

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

    Sleelin

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

    Munkyman587

    >.>
    <.<
     
  23. Offline

    ScottSpittle

    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

    Steelstiletto

    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

    ohmydoddtv

  26. Offline

    Munkyman587

  27. Offline

    iceguru

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

    stosta

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

    Veve

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

    Kaosvf

    Hi,
    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?
    Regards.
     
  31. Offline

    tidge789

    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