Interface AudienceProvider


public interface AudienceProvider
Provides various Audience instances.
  • Method Details

    • getEveryone

      Audience getEveryone()
      Returns an Audience instance representing everything and everyone. Will dynamically update as players join and leave.
    • getPlayer

      Audience getPlayer(MUUID muuid)
      Returns an Audience instance representing the player with the given MUUID. Will return an empty audience if the player is not online.
      Parameters:
      muuid - the player's MUUID
      Returns:
      the player's audience or an empty audience
    • getPlayer

      Audience getPlayer(String uuid)
      Returns an Audience instance representing the player with the given uuid.

      Keep in mind this method is not secure, especially if strict mode is disabled.

      Parameters:
      uuid - the player uuid
      Returns:
      the player's audience or an empty audience
    • getPlayer

      Audience getPlayer(mindustry.gen.Player player)
      Returns an Audience instance representing the player with the given Player. Unlike getPlayer(MUUID), this method will never return an empty audience.
      Parameters:
      player - the player
      Returns:
      the player's audience
    • getServer

      Audience getServer()
      Returns an Audience instance representing the server.
    • getPlayers

      Audience getPlayers()
      Returns an Audience instance representing all players. Will dynamically update as players join and leave.
    • getTeam

      Audience getTeam(mindustry.game.Team team)
      Returns an Audience instance representing the team with the given Team. Will dynamically update as players join and leave.
      Parameters:
      team - the team
      Returns:
      the team's audience