[INACTIVE][ADMN] DefaultPermissions v0.3.4 - OBSOLETE AS OF CB1060 [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Celtic Minstrel, Apr 3, 2011.

  1. Offline

    Celtic Minstrel

    DefaultPermissions - Make default commands compatible with Permissions
    Version: v0.3.4

    NOTE: As of recommended build 1060, this functionality is present within CraftBukkit (ie without this plugin) provided you are not using GroupManager or Permissions. See here for details.

    Have you ever wanted to give a trusted user or group access to vanilla Minecraft commands, such as /kick or /whitelist? Have you ever wanted to restrict access to the CraftBukkit commands, such as /plugins? This plugin lets you do that with permissions.

    Use: Just add the relevant permissions to whichever user or group you want to give them to in your permissions config, and voila! That user will be able to use them.

    NOTE: Most Minecraft commands are restricted to ops for a very good reason, since they can allow a user to effectively seize control of the server until someone with console access shows up. Do not give these permissions lightly. If you give your Default group access to ban and kick, and some griefer shows up and destroys your server, don't come complaining here.

    Permissions:
    • minecraft.<command> - Gives permissions for a single Minecraft command. Supported commands are: help, kick, ban, pardon, ban-ip, pardon-ip, op, deop, tp, give, tell, stop, save-all, save-off, save-on, list, say, time, whitelist, me. Note that some commands may be overridden by other plugins; if this is the case, the relevant permission will have no effect.
    • minecraft.time.set, minecraft.time.add - Finer-tuned control to the vanilla /time command; controls access to /time set and /time add respectively.
    • minecraft.whitelist.<command> - Finer-tuned control to the /whitelist command. Supported commands are: on, off, add, remove, list, reload
    • bukkit.version, bukkit.plugins, bukkit.reload - Controls access to the respective Bukkit commands.

    Download (alt link; may not be up-to-date)

    Changelog:

    Version 0.3.4
    • Fixed a bug with superperms compatibility.

    Version 0.3.3
    • Supports aliases for CraftBukkit commands.
    • Supports Bukkit superperms.

    Version 0.3.2
    • Fixed the issue with DefPerms$PlayerOverride being shown in place of a player's name when using /tell.


    Version 0.3.1
    • Commands are now intercepted regardless of case.

    Version 0.3
    • A config file is now used to decide whether to even attempt intercepting the commands. Commands not listed in the config file will never be intercepted by the plugin. Note that it still only works for built-in commands.

    Version 0.2
    • Command feedback now appears to the user instead of in the console.
    • Replaced craftbukkit.* with bukkit.*
    • Don't check for subcommands if permission for the main command was found.
    • If the player is an op, allow the command to complete normally.

    Version 0.1
    • Initial release
     
    Taranis01 and Niles like this.
  2. Offline

    kmccmk9

    Ok, the only thing I have found is worldedit.
     
  3. Offline

    Celtic Minstrel

    Hmm... not really sure if it could be that, to be honest... seems unlikely. Maybe posting a full list of your plugins would help.
     
  4. Offline

    Del43

    Great plugin. Could you change the console feedback for your plugin so it displays the player using the command
    instead of DefPerms$PlayerOverride? For example:
    DefPerms$PlayerOverride: Set time to 0
    DefPerms$PlayerOverride: Giving X some 20
    DefPerms$PlayerOverride: Teleporting X to Y.

    Don't know if this is easily done or not (probably not as Bukkit per default displays CraftPlayer and not the name of the person who used the command like a vanilla server does, too). But this would be very nice. Alternatively something less ugly than DefPerms$PlayerOverride would be cool, too.
     
  5. Offline

    Celtic Minstrel

    I think that would require a change to Bukkit.
     
  6. Offline

    imjake9

    I really like this plugin, but there are a few questions I'd like to ask.
    1. Why isn't this on GitHub? I know it's a simple plugin, but it couldn't hurt, especially since all your other plugins are on GitHub.
    2. I was forced to decompile instead, and I got something odd. I don't know if this is JAD's fault or something else, but your call to super() is not the first thing in your constructor. AFAIK, this isn't even possible. Is that just JAD's fault, or did you somehow program it that way and get it to compile?
    3. Just as a suggestion, could you make a config file that allows people to choose which commands this plugin adds Permissions to? It seems pretty easy, just load a configuration file and use it to set up the minecraftcommands HashSet.
    That's about it! But yeah, the more I look at it the more I think that JAD failed to decompile properly. Source code, pl0x? Thanks!
     
  7. Offline

    Celtic Minstrel

    It's probably JAD's fault. I don't even recall having a call to super() anywhere. I never bothered to put it on github for some reason; however, since I had it in a local repository already, fixing that will be a mere moment's work.

    As for the config file, I could consider it, sure.
     
  8. Offline

    NopeDK

    Im having some bugs with this.

    First: if access to a command isn't granted a red text with "You do not have permission...." whereas without this plugin nothing happens.
    Second: /me is not recognized as a command with or without permission granted.

    Hope it can be resolved.

    Cheers
     
  9. Offline

    Jeyge

    But the whole purpose of this plugin is to allow you to receive that message (well, really to give permissions to commands that only ops would have).

    I'm not sure what "/me" is. I don't have it on my server.
     
  10. Offline

    NopeDK

    /me is a build in function of the Minecraft SMP Server which allows you to make emotes (ex: /me dances. = NopeDK dances.) and the thing I'm talking about with the "you dont have permission" is that whenever I grant
    myself access to lets say kick, then I can use kick but if i use ban then it says i dont have permission,
    whereas before it didnt say anything.

    EDIT: Point is, people who don't have access to commands shouldn't recieve a notification that they ain't allowed to use that command, it should just be blocked hidden, like before.
     
  11. Offline

    Celtic Minstrel

    The /me command is supported. It uses the exact same mechanism as the other commands (which, come to think of it, is probably a mistake). The permissions node is minecraft.me.

    Receiving a "no permissions" message is fairly common practice with plugins that work with Permissions. I don't really see a reason to change it.
     
  12. Offline

    NopeDK

    @Celtic Minstrel
    Better try the /me again...
    About the "no permission", fairly common? Haven't had it before this plugin and I have had 5+ servers each with different permission-plugins and general-plugins. Perhaps make it configurable whether to show "No permission" and "Unknown command"?

    Just did a test, first was clean SMP, second was with Permissions only, then both Perm and Defperm without giving access, and last was Perm+DefPerm+access.

    Code:
    Its formatted like this:
    Command issued in-game: /kick
    Respons shown in chat: none
    Server log: [INFO] NopeDK tried command: kick
    
    /kick
    none
    [INFO] NopeDK tried command: kick
    
    
    /kick NopeDK
    none
    [INFO] NopeDK tried command: kick NopeDK
    
    
    /tell
    none
    [INFO] NopeDK tried command: tell
    
    
    /tell NopeDK test
    NopeDK whispers test
    [INFO] NopeDK whispers test to NopeDK
    
    
    /me
    none
    [INFO] NopeDK tried command: me
    
    
    /me dances
    *NopeDK dances
    [INFO] * NopeDK dances
    
    
    /reload
    You do not have sufficient access to reload this server.
    none
    
    
    /plugins
    Plugins:
    none
    
    
    PERM ON, DEFPERM OFF
    
    
    /kick
    [SAME]
    
    
    /kick NopeDK
    [SAME]
    
    
    /tell
    [SAME]
    
    
    /tell NopeDK test
    [SAME]
    
    
    /me
    [SAME]
    
    
    /me dances
    [SAME]
    
    
    /reload
    [SAME]
    
    
    /plugins
    Plugins: Permissions
    none
    
    
    PERM ON, DEFPERM ON, No perms set
    
    
    /kick
    You don't have permission for that.
    none
    
    
    /kick NopeDK
    You don't have permission for that.
    none
    
    
    /tell
    You don't have permission for that.
    none
    
    
    /tell NopeDK test
    You don't have permission for that.
    none
    
    
    /me
    You don't have permission for that.
    none
    
    /me dances
    You don't have permission for that.
    none
    
    
    /reload
    You don't have permission for that.
    none
    
    
    /plugins
    none
    none
    
    
    Perms granted
    
    
    /kick
    Unknown console command. Type "help" for help.
    none
    
    
    /kick NopeDK
    **Kicked by admin**
    DefPerms$PlayerOverride: Kicking NopeDK
    
    
    /tell
    Unknown console command. Type "help" for help.
    none
    
    
    /tell NopeDK test
    DefPerms$PlayerOverride whispers test
    Console line 1: [DefPerms$PlayerOverride->NopeDK] test
    Console line 2: DefPerms$PLayerOverride whispers test
    
    
    /me
    Unknown console command. Type "help" for help.
    none
    
    
    /me dances
    Unknown console command. Type "help" for help.
    none
    
    
    /reload
    Reload complete.
    **reloading all the plugins**
    
    
    /plugins
    Plugins: Permissions, DefaultPermissions
    none
    Shouldn't commands that I don't have access to, "react" like standard SMP (no msg with missing perms), the whisper function still a bit off, Unknown commands to half of the commands because missing argument (why show the msg "unkown command").

    If this could be "fixed" or at least get a configuration then this would just be even more awesome.

    Suggestion: ChatBukkit and ScrapBukkit too?
     
  13. Offline

    Ganadewa

    Very very good idea!
    It does not works on my server. Can you please update it to build 766?

    Thank you.
     
  14. Offline

    Jeyge

    Works for me on 766 although just having minecraft.give and typing /give does say it is an unknown command. Typing the full command does give me items though.
     
  15. Offline

    Ganadewa

    what do you mean with full command?
     
  16. Offline

    Jeyge

    /give - short command
    /give foo 1 1 - full command
     
  17. Offline

    Ganadewa

    "you do not have acces to this command"
     
  18. Offline

    Jeyge

    Did you give yourself access to minecraft.give? It worked on my test machine once I did that.
     
  19. Offline

    Ganadewa

    here are the permissions for the group i tested :

    Normal:
    default: false
    info:
    prefix: ''
    suffix: ''
    build: true
    inheritance:
    permissions:
    - 'craftbook.mech.cauldron'
    - 'craftbook.*'
    - 'foo.*'
    - 'iConomy.payment'
    - 'iConomy.access'
    - 'iConomy.rank'
    - 'iConomy.list'
    - 'iConomyChestShop.shop.use'
    - 'iConomyChestShop.shop.sell'
    - 'iConomyChestShop.shop.buy'
    - 'iConomyChestShop.shop.create'
    - 'mcmmo.*'
    - 'mcmmo.skills.*'
    - 'mcmmo.regeneration'
    - 'mcmmo.commands.ability'
    - 'mcmmo.commands.ptp'
    - 'mcmmo.commands.party'
    - 'mcmmo.commands.whois'
    - 'mcmmo.commands.myspawn'
    - 'mcmmo.commands.setmyspawn'
    - 'mcmmo.commands.setmyspawnother'
    - 'mcmmo.ability.woodcutting'
    - 'mcmmo.ability.mining'
    - 'mcmmo.ability.axes'
    - 'mcmmo.ability.excavation'
    - 'mcmmo.ability.swords'
    - 'mcmmo.ability.unarmed'
    - 'mcmmo.ability.herbalism'
    - 'mcmmo.item.chimaerawing'
    - 'skypirates.player.enable'
    - 'skypirates.player.changemode'
    - 'skypirates.items.*'
    - 'wormhole.use.dialer'
    - 'wormhole.build'
    - 'wormhole.remove.own'
    - 'wormhole.*'
    - 'creativebuild.build'
    - 'minecraft.give'
     
  20. Offline

    RobotGymnast

    This plugin doesn't seem to do anything.. My permissions file is as such:

    Code:
    plugin:
        permissions:
            system: default
            copies: null
    groups:
        Everybody:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            permissions:
                - 'minecraft.*'
    
    And yet, I can still only access commands like /op, /deop, /whitelist, etc. when I'm an op (which I have to do through the server).
     
  21. Offline

    Celtic Minstrel

    Hm... that should work though. What if you put in a specific permission like 'minecraft.op'? It's unlikely that it's just a case of wildcards being broken somehow, but it wouldn't hurt to try.
     
  22. Offline

    NopeDK

    Celtic Minstrel have you looked into the "/me" issue? Works without DefaultPermissions, does "missing permissions" if DefaultPermissions is on but no permission granted, and it does "unknown command" if access granted.
     
  23. Offline

    RobotGymnast

    Boy, do I feel sheepish :'( . Turns out the plugin was removed from my plugins folder! God knows how long that's been the case.. Anyway, it works now
     
  24. Offline

    imjake9

    Hey Celtic, I updated my Pull Request a while ago, but you still haven't replied to it. I'm okay if you still don't want it, but could you at least tell me why not? Thanks much! :D
     
  25. Offline

    Sanderb11

    Can i also put in: minecraft.give <name> bedrock ?
    I just want a script that only disables bedrock for only 1 person? Can I do that with this script too?

    I forgot totally to thank you, for this amazing script... I was just looking for this. But I just need that what I've described above
     
  26. Offline

    Celtic Minstrel

    To be quite honest, I haven't looked at it since you updated.

    No. This plugin only controls the default commands. If you want more fine control, I suggest you use General instead of this.
     
  27. Offline

    Parlez

    its umm not working. When you place it in the permissions e.g. minecraft.give, does that restrict or allow, and will it still work if they are all ops?
     
  28. Offline

    NopeDK

    @Parlez if they are op then this plugin does nothing. And the nodes grant permission and you give them to users you don't want to give op.
     
  29. Offline

    Celtic Minstrel

    Okay, you can now use a config file to prevent DefaultPermissions from even considering a command; just put lines of the form "command-name: false" where "command-name" is the name of the command. This version will be uploaded momentarily.
     
  30. Offline

    Puremin0rez

    I'm trying to stop /me

    I was successful in doing so, but my members can still do /ME << (caps)
     
  31. Offline

    Chromana

    @Celtic Minstrel
    Any idea if/when this will be compatible with Permissions 3.0? I've used your plugin for a while and it would be great if you could update it (if needed).

    I'm testing it with CB818 now.
     

Share This Page