Private Announcer Permission Node

Discussion in 'Plugin Development' started by M&R Coding, Jun 7, 2015.

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

    M&R Coding

    I'm 1/2 way through a plugin that I have been developing and I have ran into an issue that has completely stoked me due to I have never come across this in the entire time I have been coding. Basically so what I want to do is as an example because I didnt really know how to explain it, so say when a user gets banned, kicked, tempbanned and IP banned etc. etc., how would you code it to announce that ban but to only people with a permission node such as "ban.announce"? I know its probably quite simplistic but I've never come across it before. Thank you for your time and I really appreciate any help that is provided.
     
  2. @M&R Coding Loop through the players checking their perms and send them a message.

    Pseudo code:
    for Players : allOnlinePlayers{
    if player hasPermission("blah.blah.blah"){
    player sendMessage(String msg)
    }
    }
     
Thread Status:
Not open for further replies.

Share This Page