Can't use getPlayer().hasPermission()

Discussion in 'Plugin Development' started by rfsantos1996, Jul 23, 2013.

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

    rfsantos1996

    You can see on my GitHub LoginListener here and QuitListener here

    Without changing the permissions, QuitListener didn't recognize "logmsg.admin" or "logmsg.silent"
    I already tried to create a checkPerm(player, perm) on the main class, but didn't work either.

    Can you help me? I'm out of ideas, I even tried using Vault, but then I noticed on Vault's source that it uses "player.hasPermission();"
     
  2. Offline

    KyleParks

    rfsantos1996


    Here's how I use permissions:
    Permissions.java:
    Code:java
    1. package me.KyleParks.SB;
    2.  
    3. import org.bukkit.permissions.Permission;
    4.  
    5. public class Permissions {
    6.  
    7. public Permission Create = new Permission("SignBomb.Create");
    8.  
    9.  
    10. }
    11.  



    And here's how I get it:
    Code:java
    1. if(sender.hasPermission(new Permissions().Wrecker)){
    2. for (PotionEffect effect : player.getActivePotionEffects())
    3. player.removePotionEffect(effect.getType());
    4. pi.clear();{


    That's just my way. I don't know if others have a way of doing it.
     
  3. Offline

    rfsantos1996

    I'll try, thanks. In some hours/minutes I give you an feedback (;
     
  4. Offline

    ShadowLAX

  5. Offline

    rfsantos1996

Thread Status:
Not open for further replies.

Share This Page