Solved How to send a message to players inside of the arena only?

Discussion in 'Plugin Development' started by FoxinatorDev, Nov 14, 2017.

  1. Offline


    I've been struggling with this for quite a bit. How would I send a message to all players inside of an arena?
  2. Online

    timtower Ninja on the waves Moderator

  3. Offline


    - Get all players
    - Iterate over them in a for(each) loop
    - If they are in an area, send a message. Don't forget to check the world or even use world.getPlayers()
  4. Offline


    Thanks, I never thought of world.getPlayers(); :)
  5. Offline


    make an array list? and then once the arena is done remove them.
  6. Offline


    @FoxinatorDev Or if you want to check for all worlds use Bukkit.getOnlinePlayers();

Share This Page