Solved Get everyone NOT in an array list?

Discussion in 'Plugin Development' started by nrs23, Dec 9, 2014.

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

    nrs23

    Hey there,

    So I've got my array list of players I want to exclude from the event, but how would I get all online players except for the people in the array. I've tried going List<string> all = Bukkit.getOnlinePlayers().toString() then myarray.remove(all) but that just errors.

    Can anyone help me

    Cheers,
     
  2. Offline

    mythbusterma

    @nrs23

    I would create a TreeSet of all the players on the server, then remove those that are in the list.
     
    nrs23 likes this.
Thread Status:
Not open for further replies.

Share This Page