# project information for Bukkit in order to register our plugin with all it components
# ${-} are variables from Maven (pom.xml) which will be replaced after the build
name: ChangeSkin
version: 3.0
main: com.github.games647.changeskin.bukkit.ChangeSkinBukkit

# meta information for plugin managers
authors: [games647, 'https://github.com/games647/ChangeSkin/graphs/contributors']
description: |
    Change your Minecraft skin in-game
website: https://dev.bukkit.org/bukkit-plugins/changeskin/changeskin.bukkit/
dev-url: https://dev.bukkit.org/bukkit-plugins/changeskin/changeskin.bukkit/

# Without ProtocolLib the plugin does not work at all
depend: [ProtocolLib]

commands:
    setskin:
        description: 'Sets a new skin'
        usage: /<command> [player] <name/uuid>
        aliases: [changeskin, skin, set-skin]
        permission: changeskin.command.setskin

    skinupdate:
        description: 'Invalidates the database entry and fetches the fresh skin from the Mojang servers'
        aliases: [skin-update]
        permission: changeskin.command.skinupdate

    skinupload:
        description: 'Upload a skin to a mojang account'
        permission: changeskin.command.skinupload
        aliases: [skin-upload, uploadskin, upload-skin]
        usage: /<command> <url> [name]

    skinselect:
        description: 'Choose a skin from the database which has a specified name'
        permission: changeskin.command.skinselect
        aliases: [skin-select]
        usage: /<command> <name>

    skinskull:
        description: 'Changes the skin of a holding skull from the database which has a specified name'
        permission: changeskin.command.skinskull
        aliases: [skin-skull]
        usage: /<command> <name>

permissions:
    changeskin.command.*:
        children:
            changeskin.command.setskin.*: true
            changeskin.command.skinupdate: true
            changeskin.command.skinupload: true
            changeskin.command.skinname: true
            changeskin.command.skinselect: true
            changeskin.command.skinupdate.other.*: true

    changeskin.command.skinupdate:
        description: 'Updates the current skin'
    changeskin.command.skinupload:
        description: 'Upload a skin to a mojang account'
    changeskin.command.skinname:
        description: 'Gives your current skin a name'
    changeskin.command.skinselect:
        description: 'Choose a skin from the database which has a specified name'

    changeskin.command.skinupdate.other.*:
        children:
            changeskin.command.skinupdate: true
            changeskin.command.skinupdate.other: true

    changeskin.command.setskin.*:
        children:
            changeskin.command.setskin: true
            changeskin.command.setskin.other: true

    changeskin.command.setskin:
        description: 'Sets a new skin for yourself'

    changeskin.command.setskin.other:
        description: 'Sets a skin for another player'
        children:
            changeskin.command.setskin: true
