getting players with permission

Discussion in 'Plugin Development' started by mastermustard, Feb 22, 2013.

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

    mastermustard

    how would i go about checking all players online then doing something to ones with certain permission nodes. im having trouble figuring this out. if i missed the methods in the api reference link me if not pseudo code would be nice
     
  2. Offline

    david_rosales

    if(player.hasPermission("Permission.*")
    {

    }

    Something like that?
     
  3. Offline

    mastermustard

    obviousely but i need to get all players first im not targeting a player who performed an event or command
     
  4. Offline

    david_rosales

    i see...

    is it going to be a broadcast or some code that is ran only on certain players?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  5. Offline

    mastermustard

    not a broadcast sent to one or multiple players that have the permission node
     
  6. Offline

    iWareWolf

    mastermustard
    for(Player p : Bukkit.getServer().getOnlinePlayers){
    if(p.hasPermission("Permission"){
    //Something happens here.
    }
    }
     
Thread Status:
Not open for further replies.

Share This Page