plugin.yml issue

Discussion in 'Plugin Development' started by superbramie8, Jan 1, 2014.

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

    superbramie8

    Im having an issue with the plugin.yml after finishing my plugin.
    Now I know how to do everything, BUT the permissions.
    And I really dont want any others who are not OP using my plugins due to it being a trolling plugin.
    Could someone help me out?
    -----------------------------------
    Code:
    name: TrollPlugin
    main: org.bukkit.trollerplugin.Trollerclass
    version: 1.0
    author: Superbramie8


    commands:
    usage:
    /trollplus help - Show all trollplus commands.
    /trollplus igniter - Ignite targeted player.
    /trollplus potion - Give negative effects to targeted player.
    /trollplus chattroll - Flood chat with weird messages.
    /trollplus dimension - Teleport targeted player to nether.
    /trollplus end - Teleport targeted player to the End.
    /trollplus bats - Spawn bats around targeted player.
    /trollplus tnt - Spawn TNT inside targeted player.
    /trollplus squids - Spawn Squids around targeted player.
    /trollplus hacked - Send messages acting like server has been hacked.

    But how do I add the permissions? I just need 1 for all these commands..

    Oh and by the way, would it work that without entering:
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){

    and only entering:
    if(cmd.getName().equalsIgnoreCase("trollplus igniter")){

    ?

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  2. Offline

    xTrollxDudex

    superbramie8
    You didn't even do the commands section correctly...
    Code:
    commands:
        trollplus:
            description: trolls u
            usage: /<commands> <arguments>
            permission: trollplus.execute
            permission-message: 2 bad 4 u, no perms.
    You don't list the arguments after that. You can also handle permissions in-line:
    PHP:
    if(!sender.hasPermission("trollplus.execute")) {
        
    sender.sendMessage(ChatColor.RED "2 bad 4 u, no perms!");
        return;
    }
     
  3. Offline

    superbramie8

    Thanks! I'll make sure I'll use it



    name: TrollPlugin
    main: org.bukkit.trollerplugin.Trollerclass
    version: 1.0
    author: Superbramie8


    commands:
    trollplus:
    description: Trolls you.
    usage:
    /trollplus help - Show all trollplus commands.
    /trollplus igniter - Ignite targeted player.
    /trollplus potion - Give negative effects to targeted player.
    /trollplus chattroll - Flood chat with weird messages.
    /trollplus dimension - Teleport targeted player to nether.
    /trollplus end - Teleport targeted player to the End.
    /trollplus bats - Spawn bats around targeted player.
    /trollplus tnt - Spawn TNT inside targeted player.
    /trollplus squids - Spawn Squids around targeted player.
    /trollplus hacked - Send messages acting like server has been hacked.

    permission: trollplus.execute
    permission-message:Sucks to be you, not enough permissions.

    will that do?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  4. Offline

    xTrollxDudex

  5. Offline

    superbramie8

Thread Status:
Not open for further replies.

Share This Page