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

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

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

    FoxinatorDev

    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 Administrator Administrator Moderator

  3. Offline

    Unknown123

    - 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

    FoxinatorDev

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

    Blares

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

    Unknown123

    @FoxinatorDev Or if you want to check for all worlds use Bukkit.getOnlinePlayers();
     
Thread Status:
Not open for further replies.

Share This Page