Inactive [ADMN] ArmorKeep v1.2 - Assign Permissions to Armor [1060]

Discussion in 'Inactive/Unsupported Plugins' started by ClockworkXCV, Jul 19, 2011.

  1. Offline

    ClockworkXCV

    ArmorKeep - Assign Permissions to Armor:
    Version: v1.2

    ArmorKeep allows server admins to decide which permission groups should be able to use each type of armor.

    Requires Permissions 3
    and Spout (plugin only, not client mod)

    Features:
    • Allows admins to restrict usage of armor based on permission group
    • Returns the piece of armor to the player if they do not have permission to use it (configurable)
    Permission Nodes:
    Below is the list of all the permission nodes you can use for ArmorKeep.
    They are all self-explanatory.
    Show Spoiler
    Full Access to ArmorKeep:
    Code:
    - armorkeep.*
    Armor-related Nodes:
    Code:
    - armorkeep.leather.*
    - armorkeep.leather.helmet
    - armorkeep.leather.chestplate
    - armorkeep.leather.leggings
    - armorkeep.leather.boots
    - armorkeep.chainmail.*
    - armorkeep.chainmail.helmet
    - armorkeep.chainmail.chestplate
    - armorkeep.chainmail.leggings
    - armorkeep.chainmail.boots
    - armorkeep.iron.*
    - armorkeep.iron.helmet
    - armorkeep.iron.chestplate
    - armorkeep.iron.leggings
    - armorkeep.iron.boots
    - armorkeep.gold.*
    - armorkeep.gold.helmet
    - armorkeep.gold.chestplate
    - armorkeep.gold.leggings
    - armorkeep.gold.boots
    - armorkeep.diamond.*
    - armorkeep.diamond.helmet
    - armorkeep.diamond.chestplate
    - armorkeep.diamond.leggings
    - armorkeep.diamond.boots
    Command-related Nodes:
    Code:
    - armorkeep.help
    - armorkeep.version
    - armorkeep.check
    - armorkeep.set.*
    - armorkeep.set.returnarmor
    - armorkeep.set.logarmor
    - armorkeep.set.logcommands

    Configuring ArmorKeep:
    Show Spoiler
    Default Config:
    (order may vary)
    Code:
    # ArmorKeep v1.0 Configuration #
    LogWhenAUserIsDeniedArmor: false
    LogWhenAUserUsesACommand: true
    ReturnArmorToPlayer: true
    The only acceptable values for all of these options is true or false.

    Commands:
    Show Spoiler
    /armorkeep check [player] - Manually initiate a check on the specified player's inventory
    /armorkeep set [returnarmor|logarmor|logcommands] [true|false] - Edit the config in-game or from the console
    /armorkeep version - Display the version of ArmorKeep installed on the server
    /armorkeep help - Display the help page about using ArmorKeep commands
    /armorkeep ? - Same as /armorkeep help
    Note: You can use /ak [check|version|help] in place of /armorkeep [check|version|help] (not to be confused with /afk).

    Download ArmorKeep v1.2
    (use the links in the changelog for older versions)
    Source Code: Coming Soon

    Feel free to give some constructive criticism as this is my first plugin. :p

    Big thanks to @Afforess for his work on Spout and to @Grammar Troll for giving me the idea to hook into Spout.

    This plugin is a request from this thread.

    Troubleshooting
    Please read this before posting any error messages you get while using ArmorKeep.
    Show Spoiler

    The error below means that you didn't install BukkitContrib correctly or at all.
    Code:
    java.lang.NoClassDefFoundError: org/bukkitcontrib/event/inventory/InventoryListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:219)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:32)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at us.ClockworkXCV.ArmorKeep.ArmorKeep.onEnable(ArmorKeep.java:26)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassNotFoundException: org.bukkitcontrib.event.inventory.InventoryListener
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 26 more
    I'll add more to this section as necessary...

    Known Bugs
    • The order of the values in the config seem to switch around randomly. This isn't a problem, it's just a little strange.
    To-do List:
    • Add Permission nodes:
      • armorkeep.allarmor
      • armorkeep.allcommands
    • Add/Improve support for Bukkit's built-in permissions
    Changelog:
    Version 1.2
    • Updated to Spout (the new BukkitContrib)
    Version 1.1
    • Optimized and organized code for existing commands
    • Added the /armorkeep set command for editing the config in-game or from the console
    Version 1.0
    • Seperated permissions for each piece of armor
    • Added commands:
      • /armorkeep check - Manually initiate a check on a player you suspect of finding a way around ArmorKeep's system
      • /armorkeep version - Display the current version of ArmorKeep installed on the server
      • /armorkeep help - Display the help message about using ArmorKeep commands
    • Added a config.yml file with three configurable boolean (true/false) values:
      • LogWhenAUserIsDeniedArmor (defaults to false)
      • LogWhenAUserUsesACommand (defaults to true)
      • ReturnArmorToPlayer (defaults to true)
    • Fixed a minor issue with my constructor
    • Updated package namespace
    Version 0.2
    • Changed the armor check from PLAYER_MOVE to InventoryCloseEvent (thanks to BukkitContrib) making for a much more memory efficient plugin
    • Now requires BukkitContrib (plugin only, not client mod)
    Version 0.1
    • Initial Release of ArmorKeep
    ArmorKeep is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
     
  2. Offline

    Shad

    Thank you so much for coding this! I love you beyond belief!
     
  3. Offline

    Brazzled

    He gets a bit over excited at times, we have to keep him locked in his room, for his own safety.

    But thanks man! Will test out and give feedback.
     
  4. Offline

    Vynlar

    Checking it on PLAYER_MOVE is really inefficient. Try looking into inventory transaction or one of those events. I'm sure theres a better way to do it. Anyways great job!
     
  5. Offline

    Grammar Troll

  6. Offline

    ClockworkXCV

    Thanks for the support!
    Yeah, checking it on PLAYER_MOVE was just a temporary fix until INVENTORY_CLOSE was implemented. I'll try to have it check on something else in the next version.
    It looks like BukkitContrib has the InventoryCloseEvent that I need to improve this plugin. I'll see what I can do with this for the next version. Thanks for pointing this out!

    ArmorKeep Version 0.2
    • Changed the armor check from PLAYER_MOVE to InventoryCloseEvent (thanks to BukkitContrib) making for a much more memory efficient plugin
    • Now requires BukkitContrib (plugin only, not client mod)

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

    Grammar Troll

    I'm glad I could help! Thanks for developing this wonderful plugin!
     
  8. Offline

    ClockworkXCV

    ArmorKeep Version 1.0
    (sorry if my version numbering is hard to follow, but this is a big update)
    • Seperated permissions for each piece of armor
    • Added commands:
      • /armorkeep check - Manually initiate a check on a player you suspect of finding a way around ArmorKeep's system
      • /armorkeep version - Display the current version of ArmorKeep installed on the server
      • /armorkeep help - Display the help message about using ArmorKeep commands
    • Added a config.yml file with three configurable boolean (true/false) values:
      • LogWhenAUserIsDeniedArmor (defaults to false)
      • LogWhenAUserUsesACommand (defaults to true)
      • ReturnArmorToPlayer (defaults to true)
    • Fixed a minor issue with my constructor
    • Updated package namespace
     
  9. Offline

    ClockworkXCV

    ArmorKeep Version 1.1
    • Optimized and organized code for existing commands
    • Added the /armorkeep set command for editing the config in-game or from the console
     
  10. Offline

    bobeeb

    nice plugin.
    we use mobarena and pvparena at our server, will there be a conflict when i set leather only in the group permisson and this group member chose a class with iron armor?
    and can you add tools? like group A is only allowed to use stone tools
     
  11. Offline

    ClockworkXCV

    If a user chooses a class with iron armor and does not have permission to use iron armor they will lose it the next time their inventory is checked (the next time they close their inventory or someone uses /armorkeep check on them).
    You could probably do this by editing the blacklist for WorldGuard so that any group who uses a certain tool, is denied using it. But, I might look into it for people who don't need all the other features that WorldGuard provides. If I do make it I'll probably seperate it into ToolKeep and ArmorKeep instead of combining them.
     
  12. Offline

    Flenix

    Suggestion:
    Instead of blocking the user from wearing the armour, let them wear it and just block movement and item use/place, so they can do nothing but talk and take the armour off. Maybe if the try and do something they get a message like "This armour is too heavy for you!" or something?
     
  13. Offline

    Grammar Troll

    Spout is the new BukkitContrib, and since all the names and such were refactored, all the BukkitContrib plugins will have to be updated to use Spout.
     
  14. Offline

    ClockworkXCV

    I might look into having a configurable option where you can choose between saying "This armor is too heavy!" or just not letting you equip the armor. Thanks for the suggestion!
    Updated! Thanks for helping me keep ArmorKeep up to date. :D
     
  15. Offline

    Beauseant

    This isn't working for me, i've set up the permissions but it seems people can still wear everything. Don't know why...

    [EDIT]
    When i try to do a command like /ak help or /armorkeep help, i'll get an error.
     
  16. Offline

    Grammar Troll

    I feel bad when you thank me, since you are the one who is doing all the work. Much kudos to you!
     
    ClockworkXCV likes this.
  17. Offline

    ClockworkXCV

    A few things to check (off the top of my head):
    • Make sure you're using Permissions 3 (the only one permissions system this plugin currently supports)
    • Make sure you're using Craftbukkit build 1000 or higher (the one this is tested with)
    • Make sure you've correctly installed Spout (plugin only - not SpoutCraft)
    If you provide me with any errors that come up in the console I might be able to give you more specific suggestions
     
  18. Offline

    Beauseant

    It seems i had a problem with Permissions, thanks anyway :)
     
  19. Offline

    Plancke

    i run a building server and i use armor as a quick view of what rank someone is so maybe add an option return on death or invincabillity so they don't loose a piece when they fall or something
     
  20. Offline

    ClockworkXCV

    I'll probably add a new set of permission nodes like this:
    Code:
    - armorkeep.always.diamond.*
    - armorkeep.always.gold.helmet
    
    ... that will allow you to always have these pieces of armor equipped.
    I'll add these as soon as I get time to work on ArmorKeep. (I've been kind of busy lately)
     
  21. Offline

    Plancke

    ok thanks
     
  22. Offline

    Jijan_Dax

    Is there anyway I can configure this to NOT use spout?? I know spout is amazing but I run mods on my server, even the server plugin conflicts horribly and causes a lot of damage. :'( :'( ...
     
  23. Offline

    ElitexvxRampage

    Thank you so much for this! [cake] for you mr!
     
  24. Offline

    Werzieq

    Update :))
     
  25. Offline

    Milchshakee

    Is this plugin still updated?
    Because i find a bug:
    If you try to wear an armor with an bad durability and you are not allowed to wear this armor then the armor has a full durability.

    p.s. Nice Plugin^^
     
  26. Offline

    Twebby95

    Please update this plugin :)
     
  27. Offline

    fjutte

    please update this!! I'd donate!!!

    also, we need full support for Bukkit Perms :)
     
  28. Offline

    vasil7112

    Please update to latest bukkit version!
     
  29. Offline

    TheCuddler

    If someone would update this or redo it, I would definitely use this.
     
  30. Offline

    tachaqua

    this is the exact plugin i need for my server ¬.¬
    cant you Please Please Please update it? or can someone redo it?
     

Share This Page