Plugin.yml bug?

Discussion in 'Spigot Plugin Development' started by ula492, Jun 28, 2016.

  1. So I want no one not even an OP to have access to this command unless they have the permission.

    My YML
    default: false

    see its set to false. But OPs can still access it. Even if they dont have the permission in the group... and the inheritance is set to none.. Any ideas if i need to submit this? or maybe im doing something wrong.
  2. This is something you don't need to handle in the yaml file. Just go into the code and surround the command handling (After you've checked if the command is one of your commands, the sender is a player etc) with if(player.isOp())
  3. Op bypasses every permissions.. :)
  4. Just make the command check if the player has the permission node and cancel if not.
  5. OP still gets it :)
  6. It shouldnt if u have it false in plugin.yml doe? I could be wrong.
  7. I think it really bypasses any permissions even if it is disabled :D
  8. No, @ula492 is correct. That should work.
  9. Thought it wouldn't work but yeah thanks :)
  10. Should I report as bug?
  11. The issue they are having is that you are able to set whether or not a permission is given by default or only to ops but it's not working
    Are you doing that in the permissions section of the yml?

    Code (Text):
        description: describe the perm
        default: false
  12. Yes sir!
    Code (Text):
        default: false
  13. Looks right. How are you testing so that you know this isn't working? If you're using your main account make sure you are oped and don't have the permission from a permission plugin or something
  14. Yes, I made sure I was OP I tried it and it let me, then i deoped my self. and gave my self the perm and it worked. i removed the perm and I oped my self and worked. The Problem is, im running 1.8 and if I report as bug they will only update 1.10 :(
  15. Maybe you should update then? :p If you don't like the new pvp it's really easy to get a plugin that makes it like the old PvP and then you can be properly up to date
  16. Then I gotta update all plugins and kill my self. idk. I hate the new builds in general. Besides their buggy af. Im going to wait for a steady update release, then ill think about it. But I doubt that bug has been reported and been looked into.
  17. Now that I think about it, does '*' have an issue with it xD I forgot about that.
  18. Not necessarily, all the changes that affect us developers are awesome, like inventory titles not having a 32 char limit, and they're easy to change to

    No they aren't.

    Yes obviously lol, that gives you ALL permissions
  19. Is their anyway of bypassing?

    Like this?
    Code (Text):
    else if (user.has("*")){
                    p.playSound(p.getLocation(), Sound.NOTE_PLING, 0.4F, 3.0F);
                    Main.getInstance().MonthlyReward.put(e.getWhoClicked().getName(), System.currentTimeMillis());
                    Coins.addCoins(p, 3250);
                    p.sendMessage(" §7 §m-------------------------------------------------§r ");
                    p.sendMessage("   §f§lYou have redeemed your monthly reward and received \n" +
                            "   the following:");
                    p.sendMessage("    §f§l• §a§l4 Rare Crates");
                    p.sendMessage("    §f§l• §a§l$3,250 Coins");
                    p.sendMessage(" §7 §m-------------------------------------------------§r ");
    Also, so does OP.