Class SpectateRemotePlayerInfo
java.lang.Object
de.marcely.bedwars.api.remote.SpectateRemotePlayerInfo
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable RemotePlayerGet the player that shall be added as a spectator.Get the reason for why the player shall be added as a spectator.booleanGet whether a player is able to spectate an arena, even if it is not running.setIgnoreArenaStatus(boolean ignoreArenaStatus) Define whether a player is able to spectate an arena, even if it is not running.setPlayer(RemotePlayer player) Defines the player that shall be added as a spectator.setReason(SpectateReason reason) Define the reason for why the player shall be added as a spectator.
-
Constructor Details
-
SpectateRemotePlayerInfo
public SpectateRemotePlayerInfo()Creates a new instance.
-
-
Method Details
-
setPlayer
Defines the player that shall be added as a spectator.- Parameters:
player- The player involved in the spectate process- Returns:
- This instance
-
getPlayer
Get the player that shall be added as a spectator.- Returns:
- The player that shall spectate, set using
setPlayer(RemotePlayer).
-
setIgnoreArenaStatus
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
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
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
-