Solved Add all online players to whitelist

Discussion in 'Plugin Development' started by nrs23, Feb 8, 2014.

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

    nrs23

    So far I've got
    Code:
    for (Player online : Bukkit.getOnlinePlayers()){
                    Bukkit.setWhitelist(true);
                                    //What is the code to add all players to the whitelist
                }
    Can anyone help?
     
  2. Offline

    Tirelessly

    nrs23 online.setWhitelisted(true);
    Also put Bukkit.setWhitelist(true); outside of the loop
     
  3. Offline

    nrs23

    @Tirelessly Sweet thanks

    @Tirelessly, also do you know how you would clear the whitelist.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
Thread Status:
Not open for further replies.

Share This Page