Help with adding commands for non op players

Discussion in 'Bukkit Help' started by zander145, Dec 16, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    zander145

    I have been trying to give regular people commands like /back and /sethome and stuff, I use mcmyadmin and I added the commands to their group, but no go. Any tips on what I am doing wrong?
     
  2. Offline

    zipron

    could you please include your permission file as a code block in here?

    zip
     
  3. Here it is
    Code:
    groups:
        Everyone:
            default: true
            info:
                prefix: '&f'
                suffix: ''
                build: false
                interact: false
            permissions:
              - 'version'
              - 'motd'
              - 'servertime'
              - 'accept'
              - 'players'
        Regulars:
            default: false
            info:
                prefix: '&6[Builder]'
                suffix: ''
                build: true
                interact: true
            inheritance:
              - 'Everyone'
            permissions:
              - 'join'
              - 'invite'
              - 'lastseen'
              - 'back'
              - 'sethome'
              - 'home'
        Moderators:
            default: false
            info:
                prefix: '&1[Mod]'
                suffix: ''
                build: true
                interact: true
            inheritance:
              - 'Regulars'
            permissions:
              - 'kick'
              - 'ban'
              - 'ban-ip'
              - 'goto'
              - 'summon'
              - 'lookup'
              - 'pardon'
              - 'pardon-ip'
              - 'save-all'
              - 'say'
              - 'stats'
              - 'tp'
              - 'whois'
              - 'day'
              - 'night'
        Administrators:
            default: false
            info:
                prefix: '&d[Admin]'
                suffix: ''
                build: true
                interact: true
            inheritance:
              - 'Moderators'
            permissions:
              - '*'
    
    Code:
    users:
        yermawowns:
            group: 'Regulars'
            groups:
              - 'Regulars'
            info:
                build: true
                interact: false
            permissions: []
        catalpaz:
            group: 'Regulars'
            groups:
              - 'Regulars'
            info:
                build: true
                interact: false
            permissions: []
        shucklezzz:
            group: 'Regulars'
            groups:
              - 'Regulars'
            info:
                build: true
                interact: false
            permissions: []
        ttommcwilliams:
            group: 'Regulars'
            groups:
              - 'Regulars'
            info:
                build: true
                interact: false
            permissions: []
        Jbunce:
            group: 'Regulars'
            groups:
              - 'Regulars'
            info:
                build: true
                interact: false
            permissions: []
        basje78:
            group: 'Moderators'
            groups:
              - 'Moderators'
            info:
                build: true
                interact: false
            permissions: []
        crimsonknight3:
            group: 'Administrators'
            groups:
              - 'Administrators'
            info:
                build: true
                interact: false
            permissions: []
        zamder145:
            group: 'Administrators'
            groups:
              - 'Administrators'
            info:
                build: true
                interact: false
            permissions: []
        saphirakairi:
            group: 'Administrators'
            groups:
              - 'Administrators'
            info:
                build: true
                interact: false
            permissions: []
    
     
  4. Offline

    zipron

    Ok, so I see the problem =) To add a permission node to a player, you cannot just type the command between bracets =) .yml files are very stubborn files =P so what you need is the so called "permission node" for each command. this is a sort of "indication" for the permission plugin so it know wich commands it has to use. Each plugin, and each command of each plugin has his own permission node(s). Let's give an example:

    if you want an OP being able to set day or night, you'll need the essentials plugin. The command used is "/time day" or "/time night". Ok, so we know:
    - essentials plugin,
    - command "time"

    now comine these on a line in the config:
    Code:
    - essentials.time
    in a bigger perspective, it becomes this:
    Code:
    groups:
        Everyone:
            default: true
            info:
                prefix: '&f'
                suffix: ''
                build: false
                interact: false
            permissions:
              - essentials.time
              - essentials.list
              - essentials.sethome
    
    As I said, each plugin ahs his own permission nodes. Most of the time, they are very logical, but sometimes plugin developpers use other nodes than "pluin.command" because it's nessecary sometimes. So you should check all the permission nodes for the plugins you have. For essentials, you can find them here:
    http://ess.khhq.net/wiki/Command_Reference
    click on the "+" sign for the command you want to add, and the permission node will appear.

    One more tip:
    say you want admins to be able to use all commands of essentials, it would be rediculous to add more than 100 permission nodes for that group. That's why you can "select" in .yml files. if you want ALL permissions of essentials, you can type this:
    Code:
    - essentials.*
    the '*' means it'll take all the nodes that are possible after the "essentials" node =) you can also do this for sub-nodes, such as this:
    Code:
    - essentials.sethome.*
    be sure to check the permission node wiki of essentials for that plugin =) One more tip I can give, essentials also have a .yml guide, wich you cna find here: http://ess.khhq.net/wiki/YAML_Tutorial

    Hope this all heled you =) and sorry for the long boring post =P
    zip
     
    Crimsonknight3 likes this.
  5. That was a great amount of help!! I dont know why i didn't ask anywhere sooner. >.> Thank you tons! :D
     
  6. Offline

    zipron

    you're welcome =)
     
  7. Since i changed (corrected) the permissions file ive now started getting errors as admin trying to use certain commands. Ive copied the server log.
    Code:
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:123)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480)
    2011-12-16 09:46:35 [SEVERE] at org.yaml.snakeyaml.Yaml.load(Yaml.java:423)
    2011-12-16 09:46:35 [SEVERE] at org.bukkit.util.config.Configuration.load(Configuration.java:89)
    2011-12-16 09:46:35 [SEVERE] at com.nijiko.data.YamlUserStorage.performConversion(YamlUserStorage.java:35)
    2011-12-16 09:46:35 [SEVERE] at com.nijiko.data.YamlUserStorage.<init>(YamlUserStorage.java:30)
    2011-12-16 09:46:35 [SEVERE] at com.nijiko.data.YamlCreator.getUserStorage(YamlCreator.java:33)
    2011-12-16 09:46:35 [SEVERE] at com.nijiko.data.StorageFactory.getUserStorage(StorageFactory.java:76)
    2011-12-16 09:46:35 [SEVERE] at com.nijiko.permissions.ModularControl.forceLoadWorld(ModularControl.java:95)
    2011-12-16 09:46:35 [SEVERE] at com.nijiko.permissions.ModularControl.loadWorld(ModularControl.java:86)
    2011-12-16 09:46:35 [SEVERE] at com.nijiko.permissions.ModularControl.load(ModularControl.java:114)
    2011-12-16 09:46:35 [SEVERE] at com.nijikokun.bukkit.Permissions.Permissions.setupPermissions(Permissions.java:181)
    2011-12-16 09:46:35 [SEVERE] at com.nijikokun.bukkit.Permissions.Permissions.onLoad(Permissions.java:133)
    2011-12-16 09:46:35 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:152)
    2011-12-16 09:46:35 [SEVERE] at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:125)
    2011-12-16 09:46:35 [SEVERE] at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
    2011-12-16 09:46:35 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:141)
    2011-12-16 09:46:35 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:388)
    2011-12-16 09:46:35 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    2011-12-16 09:46:35 [SEVERE] [Permissions] Unable to load permission data.
    2011-12-16 09:46:35 [SEVERE] [Permissions] Shutting down Permissions due to error(s).
    2011-12-16 09:46:35 [INFO] [Permissions] (Yeti) was initialized.
    2011-12-16 09:46:35 [INFO] [Permissions] (Yeti) disabled successfully.
    2011-12-16 09:46:35 [INFO] Preparing level "world"
    2011-12-16 09:46:35 [INFO] Default game type: 0
    2011-12-16 09:46:35 [INFO] Preparing start region for level 0 (Seed: -2558993256696226449)
    2011-12-16 09:46:36 [INFO] Preparing start region for level 1 (Seed: 901615524)
    2011-12-16 09:46:36 [INFO] Preparing start region for level 2 (Seed: 901615524)
    2011-12-16 09:46:36 [INFO] Preparing spawn area: 0%
    2011-12-16 09:46:36 [SEVERE] Error occurred while enabling Backup v1.8.4-dev (Is it up to date?): com/nijikokun/bukkit/Permissions/Permissions
    java.lang.NoClassDefFoundError: com/nijikokun/bukkit/Permissions/Permissions
    at net.tgxn.bukkit.backup.BackupMain.setupPermissions(BackupMain.java:127)
    at net.tgxn.bukkit.backup.BackupMain.onEnable(BackupMain.java:71)
    
    After this it carries on for a LONG while giving similar severe errors about a good few of the plugins we use... plugins that up until now worked fine

    and getting a LWC internal error not allowing destruction or placement of blocks, and this is the new permissions file.
    Code:
    groups:
        Everyone:
            default: true
            info:
                prefix: '&f'
                suffix: ''
                build: false
                interact: false
            permissions:
              - essentials.version
              - essentials.motd
              - essentials.servertime
              - essentials.accept
              - essentials.players
        Regulars:
            default: false
            info:
                prefix: '&6[Builder]'
                suffix: ''
                build: true
                interact: true
            inheritance:
              - 'Everyone'
            permissions:
              - essentials.join
              - essentials.invite
              - essentials.lastseen
              - essentials.back
              - essentials.sethome.*
              - essentials.home.*
              - worldguard.region.list
              - iConomy.bank.*
              - iconomy.payment.*
              - mcmmo.commands.setmyspawn
              - mcmmo.commands.party
              - mcmmo.chat.partychat
              - pvparena.use
              - repairchest.use
        Moderators:
            default: false
            info:
                prefix: '&1[Mod]'
                suffix: ''
                build: true
                interact: true
            inheritance:
              - 'Regulars'
            permissions:
              - essentials.kick
              - essentials.ban
              - essentials.ban-ip
              - essentials.goto
              - essentials.summon
              - essentials.lookup
              - essentials.pardon
              - essentials.pardon-ip
              - essentials.save-all
              - essentials.say
              - essentials.spawner
              - essentials.stats
              - essentials.whois
              - essentials.day.*
              - essentials.night.*
              - essentials.tp.*
              - essentials.butcher.*
              - worldguard.region.removeowner.member.*
              - worldguard.region.removeowner.*
              - worldguard.region.removemember.own.*
              - worldguard.region.removemember.member.*
              - worldguard.region.removemember.*
        Administrators:
            default: false
            info:
                prefix: '&d[Admin]'
                suffix: ''
                build: true
                interact: true
            inheritance:
              - 'Moderators'
            permissions:
              - .*
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
Thread Status:
Not open for further replies.

Share This Page