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

    LRFLEW

    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.

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

    Downloads (to all my projects and source):
    http://lrflew.ismywebsite.com/bukkit.html
    Mirror:
    http://dl.dropbox.com/u/22202470/PvP.jar
    Source: http://dl.dropbox.com/u/22202470/PvP.zip

    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 http://ci.bukkit.org/ 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.

    LRFLEW
     
  2. Offline

    TnT

    Running this version:
    Code:
     2011-02-20 12:53:31 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-428-g51dd641-b54jnks (MC: 1.2_01)
    Version 1.2 of PvP Control.

    I get this error on startup.
    Code:
    2011-02-20 12:53:36 [SEVERE] Feb 20, 2011 12:53:36 PM org.bukkit.craftbukkit.CraftServer loadPlugins
    SEVERE: ENTITY_DAMAGEDBY_ENTITY (Is it up to date?)
    java.lang.NoSuchFieldError: ENTITY_DAMAGEDBY_ENTITY
            at com.LRFLEW.PvP.PvP.onEnable(PvP.java:39)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:74)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:179)
            at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:166)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:118)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:217)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    
    2011-02-20 12:53:36 [INFO] Done! For help, type "help" or "?"
    
    Also this, which I'm sure you're aware of:
    Code:
    2011-02-20 12:53:36 [WARNING] Using the stupidly long constructor com.LRFLEW.PvP.PvP(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of PvP Control to remove it! (Nothing is broken, we just like to keep code clean.)
    
     
  3. Offline

    LRFLEW

    Hmm.... It appears they got rid of onEntityDamageByEntity(). I cannot find it anymore in the JavaDocs :eek:. I'll figure out what happened and update it immediately. Any help on what happened will help me a lot.

    Edit: Found it. It's now EntityDamage() with event.getCause() == ENTITY_ATTACK
    Working on it

    No, I wasn't aware :p. What do I use now?[/quote]
    --- merged: Feb 20, 2011 8:10 PM ---
    I'm having trouble updating bukkit right now to see what's going on. I'll fix it either tonight or tomorrow when I have time to go through and download each file individually.
     
  4. Offline

    TnT

    Try starting here.

    Read up here:
    http://forums.bukkit.org/threads/warning-usings-the-stupidly-long-constructor.5015/
    --- merged: Feb 20, 2011 8:14 PM ---
    This link isn't working?
     
  5. Offline

    LRFLEW

    Actually, that was exactly it :p. That works better than what I was doing :p.

    So... It's just gone :O

    I thought it was bamboo..lukegb.com :p
    --- merged: Feb 20, 2011 8:31 PM ---
    I tried the one at your url, but whenever I run it, I get this:

    Code:
    2011-02-20 14:29:46 [SEVERE] java.lang.NullPointerException
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.Chunk.<init>(Chunk.java:47)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.Chunk.<init>(Chunk.java:57)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.EmptyChunk.<init>(SourceFile:20)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.ChunkProviderServer.<init>(ChunkProviderServer.java:32)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.WorldServer.a(WorldServer.java:66)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.World.<init>(World.java:144)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.WorldServer.<init>(WorldServer.java:24)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:127)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:118)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:217)
    2011-02-20 14:29:46 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    2011-02-20 14:29:46 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at net.minecraft.server.Chunk.<init>(Chunk.java:47)
        at net.minecraft.server.Chunk.<init>(Chunk.java:57)
        at net.minecraft.server.EmptyChunk.<init>(SourceFile:20)
        at net.minecraft.server.ChunkProviderServer.<init>(ChunkProviderServer.java:32)
        at net.minecraft.server.WorldServer.a(WorldServer.java:66)
        at net.minecraft.server.World.<init>(World.java:144)
        at net.minecraft.server.WorldServer.<init>(WorldServer.java:24)
        at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:127)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:118)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:217)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    
    And it doesn't seem to be my fault :p
     
  6. Offline

    TnT

    Don't run build 400.
     
  7. Offline

    ShaDooM

    @LRFLEW
    is pvp off by default so that ppl need to enable it first? would be good :)
     
  8. Offline

    LRFLEW

    :p

    For now, PvP is off by default, but v2.0 will allow server owners to control the default behavior. I'm working on it as we speak.
     
  9. thanks for considering my idea, as crazy as it is :p Can we have a ETA for 2.0? Or do you not really know;) Thanks!
     
  10. Offline

    LRFLEW

    Actually, I'm trying to work in all my requests (cooldown, killswitch, ect.). Yours was one of the more important ones. I am currently working on it even before cooldown or settings (not just because it is easier :p ).

    ETA = whenever I don't have a huge pile of homework :p. Definitely by spring break, but it will really be how much I end up needing to implement.
     
  11. thanks... I just thought it would be nice if a mod/admin had to go do something in a place where they may not be wanted:p HAHAHA... Just boot everyone from the server... Anyway, thanks! Is there any chance that maybe i could be a beta tester? Especially for my idea:p
     
  12. Offline

    LRFLEW

    Maybe...
    I know any pre-releases will be tested on a server I frequent yuancity.zapto.org so you can see it there, but if you ask me nicely, I may give you the first pre-release via PM :).
     
  13. Hehe... If you do have a beta release, i would be happy to help test for bugs... I own a private server that would be great for testing because of the fact that i own three minecraft accounts and could test using those... Then i could be in control of the accounts.. Anyway, ill be checking my PM's :D
     
  14. Offline

    TnT

    I love the simplicity of this plugin. Will 2.0 retain that simplicity?
     
  15. Offline

    LRFLEW

    Define simplicity. :p
    I don't plan on overcomplicating it at all. Basically, if the source code get's so complicated that I need notes to be read at all, it's too much :p. I do want to add features to make it more capable, but I will add a settings and it can be made as simple as you wish :).
     
  16. Offline

    TnT

    Well, to be honest, I used to run SavePvP in hMod, but it wasn't the plugin for me. Too many options when all I wanted was a simple way for players to say they want pvp or not. I like this plugin because it offers me exactly that, with no config files to change or permissions to set.
     
  17. Offline

    LRFLEW

    Have you ever seen his source code :p. I have, and it is way too complicated. I do want to add functionality and add a settings file, but if I try to use SafePvP as a guide, I will fall down a hole too big to fill.

    A safe bet you can make is death messages will not make it to PvP Control :p
     
  18. Offline

    Mishrathium

    Absolutely Fantastic mod. Please do consider putting in the PVP cooldown so we can manually set it. When a player can instantly disable the ability to be attacked after turning it on - it makes it far to safe.

    example, /pvp off [msg] You must wait to turn your pvp flag off

    Please do make it so we can configure the cooldowns as I would put 5 mins.
     
  19. Offline

    LRFLEW

    5 minutes :p. I am putting a cool down into v2.0, but I wasn't thinking about making it configurable. I will now since you requested it.
     
  20. Offline

    Goblox

    Is this working with 432+ and is the cool-down in place yet?
     
  21. Offline

    LRFLEW

    Tested #444 still works (imply it works until it doesn't).

    Not yet. A new version is coming as soon as I actually have time to work on it, which shouldn't be long now that the quarter is coming to a close, and v2.0 will come out with a ton of new features.
     
  22. Offline

    NOTNOT

    whrer is jar file?
    Download file has no jar file
     
  23. Offline

    SirMustachio

  24. Offline

    NOTNOT

  25. Offline

    SirMustachio

    Well clicking on the link "PvP Control 1.3" should have you download PvP.jar....
     
  26. Offline

    LRFLEW

    Let me check if the urls line up :p

    Yeah, it should be working. If it doesn't, tell me.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  27. hows it coming?
     
  28. Offline

    LRFLEW

    I'm trying to do too much at once :p. I'm currently working on killswitch, spar, and a listing feature. I finished the listing feature, I think I finished killswitch (I haven't really tested it), and sparring is coming along well. That will be the first pre-build. Then comes cooldown (I have it worked out in my head).
     
  29. Sweet! I would be happy to test killswitch ;)
     
  30. Offline

    Minorius

    I like your plugin really much,
    but could you make an option for Admins that they can attack everyone ?
    even if they have set pvp off to themself, that would be a great feature :D
     
  31. Offline

    LRFLEW

    lol. I guess I can add it for those sadistic admins :p.
    --- merged: Mar 2, 2011 9:24 PM ---
    Do you wish for players to be able to attack said admins if they have "Attack Everybody" on?
     

Share This Page