[INACTIVE][ADMIN] Modify - Tweak Permissions in game [188+]

Discussion in 'Inactive/Unsupported Plugins' started by Amagineer, Feb 2, 2011.

  1. Offline

    Amagineer

    Modify - Tweak Permissions in game
    Version: v1.0

    WARNING: THIS PLUGIN WILL NOT WORK WITH CRAFTBUKKIT BUILDS IMPLEMENTING THE OLD COMMAND HANDLING SYSTEM.
    There is an older build available here built against 166. This build is unsupported, but should work if you run 166. I WILL NOT be releasing any updates for old builds of craftbukkit, so new features will not be implemented.
    (Link to Old Build)

    This plugin adds two commands:

    /modify
    DANGER: This command will let you modify the value of ANY node in the permissions config. This is a crazily powerful command, and if you slip up using it, you can nuke your entire permissions config. Be careful! THERE IS NO UNDO
    Syntax:
    Code:
    /modify path.to.permissions.node value

    /group
    This command will let you modify the group of any online player in addition to the groups of offline players that already have a group. The /group command supports fragments of online players' names, but only the full names of offline players. You need to use valid group names. The command is case insensitive.
    Code:
    /group <playername> <groupname>


    This works with craftbukkit 188+ as far as I can tell. I can't guarentee anything with console commands will work, although from what I can see, they should.

    The Permissions nodes are:
    Code:
    modify.modify - /modify
    modify.group - /group
    
    Download: http://ge.tt/4maljOt

    TODO:
    • Add group hierarchies
    • Add user-based blacklist to prevent certain users from having their group changed
    • Respect OP status
      • Add a toggle for OP status respect
    • Add an undo command to undo slipups with /modify (And possibly /group)
    • Yell at people for running server versions that do not support the new command system
    Changelog:
    Version 1.0
    • Release
    Version < 1
    • Fix bugs, add features, write initial plugin.
     
  2. Offline

    Kaapp

    Awesome, if this works, that is xD

    Great to see someone has finally managed to do it :D
     
  3. Offline

    h0us3cat

    nice plugin but this also means if i give /group to my mods then can remove my admin rights?
    or is there a protection for it so you can only "promote" people?
     
  4. Offline

    Amagineer

    At the moment anyone with /group permissions can edit anyone's group. I generally figure that if you trust them enough to let them use /group, you trust them enough to not demote you. However, in the future I'll add a system for dealing with it. I'll probably assign each group a "power" value (or you will) and then groups can only edit groups with a lower power value than theirs (Assuming that they have permission to do so in the first place). In addition to this, I may also implement a player-based blacklist. This will all be for /group and not for /modify. /modify is meant to modify anything in your permissions config.
     
  5. Offline

    h0us3cat

    yeah i can trust my mods but i already see the reply's coming like
    **** <input message here> :)

    edit: everybody can use the /group command
    I am running build 166 and permissions 2.0
    Only gave the modify.group to my mods.
     
  6. Offline

    Amagineer

    I built this against build 225 and tested back to 188, but I'm pretty sure that 166 is before the change in the command system. I have an old build here that should work. I as far as I'm aware, it's the same except it uses the old command handling system.
    http://ge.tt/7xughNF

    EDIT: Do you mean that everyone gets the "help" for the /group command, or that everyone can change everyone else's group?
     
  7. Offline

    h0us3cat

    Not 100% tested but i think they only see the "help"
     
  8. Offline

    Amagineer

    Does the other build I provided work?
     
  9. Offline

    Stephen92

    keeps saying /group user group in red letters tried so many different types of format this is what I have in permissions, I know there's not an error in the code cause I checked it, it just wont work im not sure what to do. and what will I do if there name is not already in the permissions text as a user?
    - 'modify.modify'
    - 'modify.group'
     
  10. Offline

    h0us3cat

    I will test when i see a chance, cant restart my server anytime :)
     
  11. Offline

    Stephen92

    bump please can someone help with this?
     
  12. Offline

    Amagineer

    What build of craftbukkit are you running?
    If you're not running 188 or greater I cannot guarantee functionality. You can try to use the build that I provided for h0us3cat but I also can't guarantee it's functionality
     
  13. Offline

    Stephen92

    how do I check what build i'm using lol?
     
  14. Offline

    Daveyo

    ok, I dont really understand his first question. But what Do you do if there name isnt under users: from typing it in already. The idea is to to set up some kind of automated system so when you have 20 30 new people every day you dont have to keep typing stuff in to upgrade permissions

    updating this plugin on the fly, doesnt seem to activate it, need to restart the server :D
     
  15. Offline

    GEN3RIC

    b288 any group role (even default with no access) can change their own and anybody else's group, including Admins group. Also when I removed my own permissions through this command, it didn't re-evaluate the permissions and I was still able to do all of my Admin commands.

    Oh, and /group (with no parameters) crashed the server with this error.

    http://pastebin.com/hcfxGmAT

    Once it becomes secure and works as intended this will be a great plugin.
     
  16. Offline

    anon

    Yes same here :(
    Thats really a problem, this plugin was the only one I could make work, as essentials plugins have some issues with inheritage...
     
  17. Offline

    NathanWolf

    Wow, this is very cool! Watching...
     
  18. Offline

    atomfitz

    I might suggest adding a command that simply drops a new user into the permissions config file categorized as whatever the permissions default group is set as. Or you could make it so that the /group command creates a new entry if the specified user doesn't exist in the permissions list, As the /group command only works for existing users
     
  19. Offline

    Daveyo

    Code:
    2011-02-17 15:52:21 [WARNING] Failed to handle packet: mapping values are not allowed here
     in "<reader>", line 146, column 16:
            permissions: null
                       ^
    
    mapping values are not allowed here
     in "<reader>", line 146, column 16:
            permissions: null
                       ^
    
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:745)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:307)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:564)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:228)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:250)
        at com.amagineer.bukkit.modify.Modify.addProperty(Modify.java:164)
        at com.amagineer.bukkit.modify.Modify.onCommand(Modify.java:71)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:17)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:171)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:610)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:589)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(SourceFile:232)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:317)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:232)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    
    and kicked me. cb 323, Typed modify Blinklink7 Member which was a downgrade from Mod
    --- merged: Feb 21, 2011 12:24 AM ---
    after realizing my mistake in using /modify instead of /group I havent had any problems
    I have recieved this random error. However everything seems to work fine

    Code:
    2011-02-20 19:08:36 [INFO] <§ciSnarpy§f> Oh wait
     Feb 20, 2011 7:08:36 PM net.minecraft.server.NetServerHandler c
    SEVERE: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'group' in plugin Modify v1.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:171)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:634)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:600)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(SourceFile:232)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:77)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:317)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:232)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
        at com.amagineer.bukkit.modify.Modify.onCommand(Modify.java:83)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
        ... 12 more
    2011-02-20 19:08:38 [INFO] <§ciSnarpy§f> Lmao
     
  20. Offline

    iMatthew2

    so older build works with craftbukkit correct?
     
  21. Offline

    Amagineer

    It SHOULD work for users who aren't in the config file who are online.

    I'll take a look at those. Be VERY careful with /modify as you can nuke your entire config (as mentioned in the OP)
     
  22. Offline

    Daveyo

    this is an old error, not from 1.3. it was cb around 348
     
  23. Offline

    Vorter

    Could this be updated for 400+?
     
  24. Offline

    Daveyo

    has this been updated? I think group manager combines this and permissions so this may be obsolete eventually
     
  25. Offline

    Lee Hayward

    I now get this error when trying to add someone to a group "An internal error occured while attempting to perform this command".. Is this because I'm now using the latest build of Bukkit?
     

Share This Page