Class SpectateRemotePlayerInfo

java.lang.Object
de.marcely.bedwars.api.remote.SpectateRemotePlayerInfo
All Implemented Interfaces:
Cloneable

public class SpectateRemotePlayerInfo extends Object implements Cloneable
Contains all the info needed to be added as a spectator as a remote player.
  • Constructor Details

    • SpectateRemotePlayerInfo

      public SpectateRemotePlayerInfo()
      Creates a new instance.
  • Method Details

    • setPlayer

      public SpectateRemotePlayerInfo setPlayer(RemotePlayer player)
      Defines the player that shall be added as a spectator.
      Parameters:
      player - The player involved in the spectate process
      Returns:
      This instance
    • getPlayer

      @Nullable public @Nullable RemotePlayer getPlayer()
      Get the player that shall be added as a spectator.
      Returns:
      The player that shall spectate, set using setPlayer(RemotePlayer).
    • setIgnoreArenaStatus

      public SpectateRemotePlayerInfo setIgnoreArenaStatus(boolean ignoreArenaStatus)
      Define whether a player is able to spectate an arena, even if it is not running.

      Default value is false, in which case the process which fail if no match is running.

      Parameters:
      ignoreArenaStatus - true: will be able to join, even if the arena is not runnine
      Returns:
      This instance
    • isIgnoringArenaStatus

      public boolean isIgnoringArenaStatus()
      Get whether a player is able to spectate an arena, even if it is not running.

      Default value is false, in which case the process which fail if no match is running.

      Returns:
      true: will be able to join, even if the arena is not runnine
    • setReason

      public SpectateRemotePlayerInfo setReason(SpectateReason reason)
      Define the reason for why the player shall be added as a spectator.

      The default value is SpectateReason.PLUGIN.

      Parameters:
      reason - The new cause that made him into a spectator
      Returns:
      This instance
    • getReason

      public SpectateReason getReason()
      Get the reason for why the player shall be added as a spectator.

      The default value is SpectateReason.PLUGIN.

      Returns:
      The cause that made him into a spectator