Permission Attachment stuff

Discussion in 'Plugin Development' started by girardcome, Apr 23, 2014.

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

    girardcome

    Hi there, so i have trouble problem, i want to remove an attachment permission that i gave to a player...
    Code:java
    1. Player target = Bukkit.getServer().getPlayer(args[1]);
    2. if (kit2.name().toLowerCase().equalsIgnoreCase(kit.toLowerCase())) {
    3. target.addAttachment(plugin, "hg.kits." + kit2.name(), true);

    This code is working, but i do this:
    Code:java
    1. target.removeAttachment(plugin, "hg.kits." + kit2.name(), true);

    it will not work! I don't know why, or i don't know how to remove an attachment permission from a player...
    Please Help. Thanks.
     
  2. Offline

    BillyGalbreath

  3. Offline

    Necrodoom

    As i told you on skype, you will need to learn how to use java before trying to code plugins. As BillyGalbreath said, do not use the permission attachment, if you want to check a permission, use the player.hasPermission. You do not need to save permission nodes to your configuration file either, thats what bukkit is for.

    Also, please dont call random people on skype for help, we can help you here without any problems.
     
  4. Offline

    BillyGalbreath

    If you're just checking perms, do what necrodoom said.

    player.hasPermission()

    If you are literally adding or removing permissions, use Vault so you dont create conflicts with permission plugins. Vault will hook into the permission plugin instead of conflicting with it.
     
    blue1 likes this.
Thread Status:
Not open for further replies.

Share This Page