[ADMN/SEC] PvPable v0.3.2 - Comprehensive PvP Control; Now with Proximity-Command-Restrictions [953]

Discussion in 'Inactive/Unsupported Plugins' started by DrBoweNur, Jun 29, 2011.

  1. Offline

    DrBowe

    PvPable - Control who can and can't PvP with a single permission node!
    Version: v0.3.2
    Download: PvPable v0.3.2 (JAR)
    Requested by @Monkz

    IMPORTANT: v0.3+ IN ORDER TO USE THE NEW COMMAND RESTRICTION FEATURE, YOU MUST SET THE USE-COMMAND-RESTRICTION NODE IN THE CONFIG TO TRUE! IT WILL NOT WORK OTHERWISE!

    This plugin started out very simple. It allowed you to control who could and could not take part in PvP with one simple permission node 'PvPable.enable'
    However, it now boasts a full CUSTOM command-restriction interface (based on how close a player is to the command sender), and in due time, it's sure to have more features!

    THIS PLUGIN REQUIRES PERMISSIONS.

    Features:
    • Allows people to set permission nodes for players who can/can not take part in PvP(For example, a Merchant Group on an RPG server without PvP.enable wouldn't be able to attack players, or BE attacked by players)
    • Sends notifications to tell players why they can't attack others.
    • (NEW) Full-Featured Configuration! (Notifications, as well as command restrictions info)
    • (NEW) CUSTOM Command Restrictions based on how close a player is to the command sender (customizable radius, of course! ;) )
    Permissions:

    • 'PvPable.enable' - Any player with this node is allowed to PvP, but they can't attack players without this node
    • (NEW) 'PvPable.override' - Any player with this node will ignore CommandRestriction (if its set to true in the config)
    (NEW) Configuration:
    Show Spoiler

    CommandRestriction:
    Restriction-Range: 20.0
    If a player is within this range, any commands defined in Restricted-Commands will be disabled.
    Restricted-Commands:
    - command1
    List of restricted commands. Loads 'command1' by default, you can change (and add) accordingly.
    DO NOT USE THE / in the command name!
    Use-Command-Restriction: false
    This must be turned to true in order for the command restriction to work!
    Custom-Messages:
    These are pretty self explanitory, let me know if you get lost, however!
    Attacker-PvP-Disabled: You can't attack a player if you have PvP disabled!
    Attacked-PvP-Disabled: You can't attack a player that has PvP disabled!
    OP-Attacking-Disabled: Careful, the person you're attacking has PvP disabled!


    Bug Reports:

    You know the drill, people!
    Bukkit Build # AND Error in console.

    Known Issues:
    Show Spoiler

    • None yet, but as I did 0 bug testing (didn't have time, and wanted to release this to the guy who needed it) there's bound to be some

    TODO:

    Show Spoiler

    • Dunno, made this as a request. You tell me.

    Changelog:
    Version 0.3.2
    • CmdRestriction now prevents any command that contains a restricted command
    • Example: - 'party tp' Will deny any command with "party tp" in it (so /party tp <playername>)

    Version 0.3.1
    • Added permission node 'PvPable.override' to allow players to bypass CmdRestriction, even if its on
    • CmdRestriction now has OP support (Ops override by default, now)
    Older Changelogs

    Show Spoiler

    Version 0.3
    MAJOR UPDATE!
    • Added the new Command-Restriction (based on player proximity) feature!
    • Added a comprehensive configuration file!
    • IMPORTANT: To use the new Command-Restriction feature, you MUST set the Use-Command-Restriction to true in the config, as it defaults to false (to minimize plugin weight on the server, if people dont want to use this feature)
    Enjoy! ;)

    Version 0.2
    • Changed the core permission node to 'PvP.enable' (for inheritance purposes)
    • Added alerts to players who were denied PvP (tells them why they can't attack the other player)
    Version 0.1.1
    • Now allows OPs to attack players, regardless of the target's PvPable status
    Version 0.1
    • Releasing PvPable
     
  2. Offline

    Monkz

    It works as you said. perfectly, just as OP i cant hit anybody now. Is there a way to fix that? And allow you to disable it from OP's?

    And thank you very much too! I'm really happy you did this!
     
  3. Offline

    DrBowe

    I was thinking of adding OP support, but I was already running late :p
    I'll throw it in really fast right now, if you want. Give me 5 mins

    EDIT:
    Done, v0.1.1 has OP support.
     
  4. Offline

    kahlilnc

    Mm what about inheratence. I dont want default to pvp
     
  5. Offline

    DrBowe

    So you want to put 'PvPable.disable' in default, but want players that aren't in default to still be able to PvP? I can add another permission node 'PvPable.override' that will take precedense over any player that has PvPable.disable, if that's what you want. :)
     
    kahlilnc likes this.
  6. Offline

    Codisimus

    why not make it PvPable.enable instead? since most admins have *
     
  7. Offline

    DrBowe

    Well, I designed this around a request from a server owner who wanted to make it so only one group couldn't PvP.
    If I changed it to enable, I'd be stuck with having to make another permission node to override it for the group that he didn't want to be able to PvP.

    I'm going to go ahead and add a 'PvPable.override' node, which will be (in my opinion) the easiest way to work around the issue.

    That way, any admin with '*', will have both disable and override, and it won't affect them much.
     
  8. Offline

    kahlilnc

    Exactly.
     
  9. Offline

    DrBowe

    @Codisimus
    Actually, I see the problem you're getting at now.
    I'll make it into 'PvP.enable'
    To help anyone who might not know what you need to do with permissions after this change:
    @Monkz

    Default Permissions:
    - 'PvP.enable'

    Group (that inherits default) that you don't want to be involved in PvP
    - '-PvP.enable'

    @kahlilnc
    In your case, just dont add 'PvP.enable' to default, and add it to any other groups that you would like to be able to PvP

    I'll release an update for this in the next 5 or so mins.
     
  10. Offline

    Codisimus

    Don't change it just for me bc I don't even run a server anymore. Just in my opinion I think .enable works better for admins.
     
  11. Offline

    DrBowe

    Done.
    v0.2 is out.
    • Core permission node (and functions) changed to PvP.enable. Please re-read the thread to understand how to make this plugin achieve the same effect that it had before.
    • Added alert messages to players who were denied PvP (whether it be because they HAVE the enable node, or because the player they tried to attack DOESNT have the enable node)

    No, I think your suggestion actually works better. It might cause a little more hassle with set up, but this will allow admins with '*' to still be able to PvP without any extra, confusing nodes.

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

    Codisimus

    Just to clarify are there to different messages? (ex. "You can't PvP! and "Other player can't PvP!")
     
  13. Offline

    DrBowe

    There are, it goes as follows:
    In the event that either player has PvP disabled...

    If the attacker is missing the node:
    "You can't attack a player if you have PvP disabled!"

    Else, if the person being attacked is missing the node:
    "You can't attack a player that has PvP disabled!"

    I was tempted to just post the code...but I wanted to make sure others could understand if they wanted too :p
     
  14. Offline

    Monkz

    This is great! Exactly what i needed. Now only other thing i can think of atm, is maybe making it so if an OP hits a person who is disabled PvP, it notifies him that their pvp is disabled so that he doesnt accidentally kill somebody who doesnt pvp

    Thank you so much for actually making something that works!

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

    DrBowe

    Give me 5 more minutes ;)

    EDIT:
    Done. I'm not even going to bother to release it as a new version...as I'm too lazy to edit all the version numbers (petty, I know!)
    The message it sends is "Careful, the player you're attacking has PvP disabled!"

    If you want, I can add a config so you can set custom messages for each of the 'events' for attacking a player with PvP disabled, whether you're an OP or not.

    (Make sure you redownload the jar from the link, so you get the updated version)
     
  16. Offline

    DrBowe

    Version 0.3 is out, people!
    Pretty MAJOR update!
    This is another request by @Monkz (and I decided to merge it with this plugin!)
    • New Command-Restriction (based on Customizable Player proximity)!
    • New Configuration file, to tweak and edit as you so desire!
    Let me know how it goes, people!
    Enjoy ;)
     
  17. Offline

    Minecraft93

    Request :Make it So Each person can activate it when ever. then when they enable it ask The Person if They want to buy armor or a weapon.
     
  18. Offline

    DrBowe


    So a command to '/pvp on' and '/pvp off'? I can do that.
    Also, about the 'buying' feature, you'd have to elaborate more. That sounds like a bit of a stretch for a plugin thats supposed to be simply about controlling PvP and keeping it fair
     
  19. Offline

    Liquidd46

    @DrBoweNur

    For the command restriction how would I go about restricting a command that would be like /party tp name
     
  20. Offline

    Minecraft93

    Ok Nevermind lol. yea i was thinking to hard when i posted that.
     
  21. Offline

    Plague

    Update the plugin to latest recommended build and change the title accordingly.
    Failure to do so will result in this moving to INACTIVE section.
     
  22. Offline

    DrBowe

    Currently, there isn't. It's a miracle that I managed to grab a connection down here, so I might be able to upload a quick update that will block commands if they contain any part of the 'restricted' command.
    @Plague
    To be fair, it was never moved to release in the first place. Tested and changed title though ;)
     
  23. Offline

    Plague

    Well it never conformed to the guidelines apparently.
     
  24. Offline

    DrBowe

    @Plague
    I'd like to think that it never actually 'broke' the guidelines, but was rather thrown out into submissions at the wrong time.

    While a RB was being made for 1.7, not many plugins were being moved to the 'released' section. Push came to shove, and I ended up leaving for a trip before the RB was released.

    Sooo, when you guys came to approve/disapprove, it was still 1 RB behind. Oh well, glad its all sorted out now, at any rate.
    *shrug*
     
  25. Offline

    DrBowe

    @Liquidd46
    Version 0.3.2 is out
    • Added ways to block commands that use any variety of variables.
    So, in order to block '/party tp <playername>'
    In config:
    Restricted-Commands:
    - party tp
     
  26. Offline

    Olat

    @DrBoweNur
    Doesnt work.. No idea why TBH. CB 1000
    Any player even my guests can punch people
    I want it so my guests can not PVP .. I gave the permission node to my Base User class Peasant and everything is inherited up from that....

    but everyone can still PVP.
    Code:
    groups:
        Guest:
            default: true
            permissions:
            - essentials.motd
            - essentials.rules
            - essentials.list
            - essentials.compass
            inheritance: []
            info:
                prefix: ''
                build: false
                suffix: ''
        Peasant:
            default: false
            permissions:
            - -falsebook.ic.mc1000
            - -falsebook.ic.mc0272
            - -falsebook.ic.mc0271
            - PvPable.enable
            - falsebook.blocks.bridge
            - falsebook.blocks.door
            - falsebook.blocks.gate
            - falsebook.blocks.readbooks
            - falsebook.ic.selftriggered
            - falsebook.ic.standard
            - towny.wild.*
            - towny.town.resident
            - towny.top
            - supernatural.player.shrineuse
            - supernatural.player.wolfbane
            - supernatural.player.witchhuntersign
            - creativegates.use
            - timerank.listranks
            - timerank.buyrank
            - supernatural.command.*
            - jobs.join.*
            - jobs.world.*
            - modtrs.command.check.self
            - modtrs.command.check.
            - modtrs.command.modlist
            - modtrs.command.modreq
            - iConomy.access
            - iConomy.list
            - iConomy.payment
            - iConomy.rank
            - timerank.playtime
            - essentials.help
            - essentials.afk
            - essentials.mail
            - essentials.mail.send
            - essentials.msg
            - pvpreward.getreward
            - pvpreward.givereward
            inheritance:
            - Guest
            info:
                prefix: ''
                build: true
                suffix: ''
        Squire:
            default: false
            permissions:
            - war.player
            - war.warp
            - simplesignedit.edit
            - essentials.depth
            - localshops.user.*
            - runecraft.rune.mound
            - runecraft.rune.phantomtorch
            - herobounty.new
            inheritance:
            - Peasant
            info:
                prefix: ''
                build: true
                suffix: ''
        Knight:
            default: false
            permissions:
            - herobounty.accept
            - herobounty.list
            - iConomy.bank.access
            - iConomy.bank.deposit
            - iConomy.bank.join
            - iConomy.bank.leave
            - iConomy.bank.list
            - iConomy.bank.main
            - iConomy.bank.main.change
            - iConomy.bank.main.set
            - iConomy.bank.main.view
            - iConomy.bank.transfer
            - iConomy.bank.withdraw
            - lwc.protect
            - essentials.home
            - essentials.sethome
            - torchmissile.SingleMode
            inheritance:
            - Squire
            info:
                prefix: ''
                build: true
                suffix: ''
        Baron:
            default: false
            permissions:
            - elevators.builder
            - towny.town.claim
            inheritance:
            - Knight
            info:
                prefix: ''
                build: true
                suffix: ''
        Count:
            default: false
            permissions:
            - elevators.advancedbuilder
            - localshops.manager.*
            - runecraft.rune.greenthumb
            - runecraft.rune.shrubseed
            - runecraft.rune.snowshovel
            - runecraft.rune.leafblower
            - runecraft.rune.dispelling
            - runecraft.rune.firepick
            - runecraft.rune.icepick
            - runecraft.rune.waterpick
            inheritance:
            - Baron
            info:
                prefix: ''
                build: true
                suffix: ''
        Duke:
            default: false
            permissions:
            - runecraft.rune.zeerixchest
            - runecraft.rune.forcefield
            - runecraft.rune.automationdesignator
            - runecraft.rune.redstonesensor
            - runecraft.rune.pressuresensor
            - runecraft.rune.flight
            - torchmissle.Normal
            inheritance:
            - Count
            info:
                prefix: ''
                build: true
                suffix: ''
        Viceroy:
            default: false
            permissions:
            - runecraft.rune.fairyboots
            - runecraft.rune.hiddendoor
            - runecraft.rune.damagesensor
            - runecraft.rune.blocksensor
            inheritance:
            - Duke
            info:
                prefix: ''
                build: true
                suffix: ''
        King:
            default: false
            permissions:
            - runecraft.rune.secretpanel
            - runecraft.rune.magiclasso
            inheritance:
            - Viceroy
            info:
                prefix: ''
                build: true
                suffix: ''
        Moderator:
            default: false
            permissions:
            - towny.town.new
            - towny.nation.new
            - rankup.*
            - essentials.ban
            - essentials.jail
            - essentials.kick
            - essentials.time
            - essentials.tp
            - essentials.tphere
            - essentials.tppos
            - essentials.unban
            - supernatural.admin.command.cure
            - supernatural.admin.command.curse
            - supernatural.admin.command.power
            - jobs.admin.info
            - jobs.admin.fire
            - jobs.admin.employ
            - jobs.admin.promote
            - jobs.admin.demote
            - modtrs.mod
            - modtrs.command.ban
            - modtrs.command.unban
            - modtrs.command.check
            - modtrs.command.complete
            - modtrs.command.broadcast
            - modtrs.command.teleport
            - creativegates.create
            - creativegates.destroy
            - simplesignedit.edit.all
            - war.*
            - essentials.god
            - essentials.god.others
            - essentials.heal
            - essentials.ban
            - essentials.banip
            - essentials.broadcast
            - essentials.deljail
            - essentials.jails
            - essentials.kick
            - essentials.kick.notify
            - essentials.kickall
            - essentials.mute
            - essentials.setjail
            - essentials.tempban
            - essentials.togglejail
            - essentials.unbanip
            - essentials.delwarp
            - essentials.jump
            - essentials.warp
            - essentials.warp.list
            - essentials.warp.otherplayers
            - essentials.joinfullserver
            - essentials.clearinventory
            - essentials.clearinventory.others
            - essentials.setwarp
            - essentials.tp
            - essentials.tpall
            - essentials.tphere
            - essentials.tppos
            - essentials.teleport.cooldown.bypass
            - essentials.teleport.timer.bypass
            - essentials.suicide
            - essentials.kill
            - essentials.home.others
            - essentials.sethome.others
            - OpenInv.openinv
            - OpenInv.search
            - OpenInv.crossworld
            - worldedit.clipboard.*
            - worldedit.navigation.thru
            - worldedit.navigation.jumpto
            - worldedit.wand
            - worldedit.region.set
            - worldedit.region.replace
            - worldedit.history.undo
            - worldedit.history.redo
            - worldedit.drain
            - worldedit.fixlava
            - worldedit.fixwater
            - worldedit.extinguish
            - worldedit.butcher
            - localshops.free.create
            - localshops.free.move
            - mothernature.*
            - spyer.seeAll
            - spyer.spy
            - spyer.stopmobs.admin
            inheritance: []
            info:
                prefix: ''
                build: true
                suffix: ''
        Admin:
            default: false
            permissions:
            - towny.admin
            - essentials.kit
            - essentials.kit.newbiekit
            - -supernatural.admin.infinitepower
            - supernatural.admin.command.reset
            - supernatural.admin.command.reload
            - supernatural.admin.command.save
            - supernatural.admin.command.setchurch
            - supernatural.admin.command.setbanish
            - supernatural.admin.command.setcoven
            - jobs.admin.grantxp
            - jobs.admin.removexp
            - jobs.admin.transfer
            - jobs.admin.reload
            - logblock.*
            - modtrs.command.reload
            - modtrs.command.complete.override
            - timerank.reload
            - essentials.spawnmob
            - SpawnControl.spawn.set
            - SpawnControl.groupspawn.set
            - SpawnControl.config
            - lwc.admin.*
            - lwc.admin
            - localshops.admin
            inheritance: []
            info:
                prefix: ''
                build: true
                suffix: ''
     
  27. Offline

    DrBowe

    @Olat
    Are there any errors in the console? Or any type of message at all?
     
  28. Offline

    Olat

    @DrBoweNur
    No sir.
    Ive tried three non PVP plugins. GroupPVP, ManagePVP and yours.. None of them make my Guest acct NOT be able to attack.. I have NO clue whats wrong.
     
  29. Offline

    Oscarius

    Can this plugin be made to turn off god mode (as in, automatically type the /ungod command) when in proximity of another player?
     
  30. Offline

    DrBowe

    @Olat
    Well, this may seem like a silly question, but does the console atleast display that the plugin is enabled?
    @Oscarius
    That would be difficult, and maybe even impossible. I can't really control what a plugin does to change the damage of an event --AKA God Mode-- (unless I set this plugin to the highest priority, which *might* work...but still)
     

Share This Page