Inactive [MECH] PvP Control v1.6 - Allows players to control if they can be attacked [818]

Discussion in 'Inactive/Unsupported Plugins' started by LRFLEW, Jan 18, 2011.

  1. Offline


    My first plugin release. After numerous threads, arguments, and issue suggestions and bugs, it's finally here.

    NOTE: version 2.0 in the works. Follow the progress here.

    PvP Control allows players to decide themselves if they want to fight other players. No longer will you have to worry about PvP griefers (and I have seen a few in my day). Whenever a player logs in, it tells him that PvP is off for him/her, and allows them to run the command "/pvp on" to turn it on. Only if the two combatants have PvP on will the attack work, otherwise it will cancel.

    This plugin WILL NOT WORK if you do not change the pvp setting in the to true. To reiterate: in make sure it reads pvp=true

    Downloads (to all my projects and source):

    Version History:

    NOTE: A version 2.0 is very soon to come. It will add much wanted features such as cooldown, killswitch, and even sparring
    • 1.6: Removed redundant source code hidden in the jar file
    • 1.5: Added ebean dependency and small details updated
    • 1.4: My hand was forced, and I changed from onPlayerCommand() to onCommand() (it was going to be a feature of v2.0)
    • 1.3: changed to onEventDamage() as per the newest build (also removed long caller). Make sure to use the latest build from or use 1.2
    • 1.2: changed package name to comply with EvilSeth's request (don't worry, v2.0 is coming)
    • 1.1: allowed arrows to be controlled by PvP Control
    • 1.0: fixed issue; now PvP cancel event is set to priority Low
    • h.1: first release, had an issue I wanted worked out
    NOTE: this only cancels bad PvP attacks, doesn't make good ones work. If another plugin prevents PvP in an area, or the PvP setting in the server settings file is set to false, it will still stop PvP attacks even if PvP Control is set to on for both combatants.

  2. Offline


    i just want that the admins should always be able to kill all other peoples, if that can be enabled or not isn't so important :)
    but thanks for appreciate my suggestion
  3. Offline


    Does this have multiworld support? though I guess we could just not give the cmds to some worlds.
  4. Offline


    Multiworld support suggests that something requires the location of something. Since this is just a plugin on entity damages (when the entity is a player), there is no multiworld support necessary.
    In short, yes, it works with multiwords.
  5. Offline


    Watching this topic in anticipation of the 2.0 release. I don't want to unleash something like this on my server without a customizable cooldown. [​IMG]
  6. Offline


    Sorry it's taking so long. If there's any features you want, now is the time to tell me.
  7. Offline


    I don't mind waiting ;)

    The only requests I can think of are the customizable cooldown which has already been discussed and permission nodes. For the cooldown, maybe 2 settings for /pvp off and /pvp on.
    off-cooldown = 1800 #The time in seconds before you can use /pvp off
    on-cooldown = 600 #The time in seconds before you can use /pvp on
    Player uses /pvp on and cannot use /pvp off for 30 mins
    Player uses /pvp off and cannot use /pvp on for 10 mins
    Duration needs to persist through logging out and back in

    For permissions nodes, something like:
    pvpcontrol.admin - Can kill any player regardless of current flag (as suggested earlier, I like it!)
    pvpcontrol.user - Basic permission that gives access to /pvp on and /pvp off and /pvp list if you add it
    pvpcontrol.killswitch - For your killswitch suggestion
  8. Offline


    1) 30 minutes ? wow, but no arguments.
    2) You want one for off to on? I wasn't sure if people wanted that, but that will be included
    3) persists will require either changing the Sets and Maps to player name references instead of just player references or a saving mechanism on quit. I'll work on it.

    Also, should I setup persistence of PvP settings themselves when cooldown isn't on?

    I was thinking more of a command that those with permissions can run, but I'm still programming that part, so anything can happen.
    That could cause more problems that solutions, but I'll see if it will work.

    Why I feel the need to comment on every post made here is beyond me :p.
  9. Offline


    my opinion for a "admin attack all option" would be enable the useage in permissions, then the admin with the available command can run "/pvp anyon" and "/pvp anyoff" to enable/disable attacking anyone

    *waits for 2.0
  10. Offline


    I have bad news for everybody waiting on v2.0 sadly. I planned on having a lot of time this week to work on it, but I just took my temperature, and it read 101.1ºF (about 38.39ºC), and I am not feeling so great either. v2.0 will have to be pushed back a little, but I have a long plane ride coming up next week, so I may still be able to get it done soon. Sorry for the inconvenience.
    Update: I took a test at the doctor's office (I didn't studdy :p) and I tested positive for Influenza B.

    ....This sucks.
  11. Offline


    Well, once you're feeling better, is there any possiblity of a way for other plugins to check if someone is flagged or not?
  12. Offline


    I think that technically you can. In the main class there is a ArrayList called PvPon that has a list of all players with PvP on. With the new version, the name will change and will be a little more open, but for now it should work (my source is available above).
  13. Offline


    Excellent! I'll build support for this into JuggernautSpirit then!
  14. Offline


    I would like to see a command like /pvp list to see who is enable.
  15. Offline


    Hmm when i write /pvp on, it say me that's ok but nobody can hit persons who are in mode pvp on, so it doesn't work :( how can i fix that ?
  16. Offline


    It's coming, it's coming. Just wait for me to finish up this latest update :p.

    I need more details. Keep in mind that both combatants need to have pvp on.
  17. Offline


    Have u set "PvP=true" n server properties?
  18. Offline


    Ok it's good thanks
  19. Offline

    tha d0ctor

    can't wait for the new release. how about a command:

    player types:
    /pvp duel <player:bobdole> <iconomyamount ex: 500> <duel location ex: my_building_roof> <weapon ex: diamond_sword;diamond_helmet>

    bob dole is prompted in console:

    Player has challenged you to a duel on: my_building_roof for 500 Coin, do you accept?
    Type /yes to accept /no to decline

    If the player accepts both players are teleported to the pre-defined region my_building_roof, their inventories are placed on stand by and they are give just a diamond sword and diamond helmet. There they have 1 minute to fight until death or else the victory conditions are not me. This time could then be set in a config file to shorten or lengthen it.
    After the duel and the prizes are won accordingly the players are teleported back to their original locations with their original inventories.

    you would cuboid type commands to define 2D regions to have different dueling areas, that way you cna have predefine arena's
  20. Offline


    Sparring is coming, and what you described is a very complex sparring system. Once I'm done with this plugin, I plan on working on an arena plugin, and that may be more of what you are looking for. As for now, I would just like to finish up what I've started and get this actually finished :p.
  21. Offline


    Simple, easy, works... Thanks!
  22. Offline


    I'd like to be able to customize plugin messages.
    Or I can make fork if author doesn't like to realize this feature.
  23. Offline


    That's going to take a lot of work. I'll work on it, but it will take a lot of time.
  24. Offline


    Not much work. Do you host your project on github or somewhere else? Can I join dev team? Today your plugin will be tuned.
  25. Offline


    Currently, v2.0 isn't published publicly mostly because I worry about keeping my eclipse project and the uploaded version in sync, but with just the latest features I've been trying to put in, I've found out I may need more hands on this project, and may make it open. If you can suggest a website to make it open on, I'll upload what I have so far this weekend (I'm currently out of the country and have very bad internet :p).

    Also, I'm trying to clean up the code a little bit and currently I have six classes and I may add more just to keep with this new style of programming I'm trying. Other people adding on may cause style issues that I'm trying to avoid.

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


    I just added message customization feature and made a little refactoring. I will publish a link to my version here in 1-2 hours.
  27. Offline


    You're probably looking at the v1 code, but I'll still be able to work with it anyways. Send me what you have when you can, and I'll work on incorporating it into v2 (that is something that needs to be build with the settings system I have almost finished)
  28. Offline


    Here is my work — PvP 1.5 — [link deleted]. Jar contains source code inside. Some notices:
    — Of course, plugin detects if there are no defined configuration and makes it. You need just upload PvP.jar into plugins directory and restart server.
    — Plugin doesn't support cirillic or other non-English characters. I'm working on it.
    — Plugin a totally Javadoc'ed! =)
    — Added onPlayerKick event into PlayerEvents listener. It's rare event, but not impossible.
    — Civil logger added and totally used. =) again.

    — Add cirillic support.
    — Add human readable and writable color format. Because «§c» is terrible.

    Sorry, i left one service command in jar, that is right link — [link deleted].

    That's new version — PvP 1.5.1 — [link deleted]

    [+] Added human readable colors into configuration. Just erase old configuration.
    [+] Added talker class. It can send one ore more (String or ArrayList<String> from configuration) messages to player.

    [?] Cirillyc still not working.

    PvP 1.5.2 — [link deleted]
    [+] Added totalwar (your `killswitch`) functionality
    [*] Some improvements
    [*] Killed some bugs

    Erase old config.

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


    Ok, here's where I have to make a request of you.

    I want to control my plugin fairly tight and don't want others working on it directally. I release my source so that any other devs who want to use my code for their plugin can.

    I think you should start your own plugin thread with this. Give me the link to your variant and I'll link to you. I will not help people if they have problems with your variant, and it will be easier for people to find you for help if it's its own thread.

    I will work with your source and use it as reference in my upcoming update (I still want to mostly program it, as it will force me to remember how it works and make it easier to debug). If you don't want me to use you code at all in my project, just tell me.

    I'm trying not to be harsh, but it's hard :p
    Last edited by a moderator: Dec 15, 2016
  30. Offline


    All is ok! =) I just write my version of your plugin for my server. I promise, no more code in your thread! NSA. =) Good luck!
  31. Offline


    I didn't ask you to stop :p. You can keep posting your revisions, just tell me via PM if you don't want to announce it. I will work on incorporating it into v2 (if I ever get enough free time to finish it :p).

Share This Page