Package de.marcely.bedwars.api.arena
Class BedDestructionInfo
java.lang.Object
de.marcely.bedwars.api.arena.BedDestructionInfo
Data container for
Arena.destroyBedNaturally(BedDestructionInfo)
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The specifc cause or action of the bed destruction. -
Method Summary
Modifier and TypeMethodDescriptionstatic BedDestructionInfo
Construct a new instance of this data container.getCause()
Get the specific cause or action of the bed destruction.@Nullable Player
Get the player that is responsible for the bed destruction.@Nullable String
Get the explicit name of the thing that broke it (e.g.Get the team of whom the bed shall be destroyed.boolean
Get whether a sound shall be played.boolean
Get whether a chat message shall be sent.void
isSendingChatMessage
(boolean sendMessage) Set whether a chat message shall be sent.boolean
Get whether a title shall be sent.void
setCause
(BedDestructionInfo.Cause cause) Set the specific cause or action of the bed destruction.void
setDestroyer
(@Nullable Player player) Set the player that is responsible for the bed destruction.void
setDestroyerName
(@Nullable String name) Set the explicit name of the thing that broke it (e.g.void
setPlayingSound
(boolean playSound) Set whether a sound shall be played.void
setSendingTitle
(boolean sendTitle) Set whether a title shall be sent.void
setTargetTeam
(Team team) Set the team of whom the bed shall be destroyed.
-
Method Details
-
getTargetTeam
Get the team of whom the bed shall be destroyed.- Returns:
- The target team
-
setTargetTeam
Set the team of whom the bed shall be destroyed.- Parameters:
team
- The target team
-
getDestroyer
Get the player that is responsible for the bed destruction.- Returns:
- The responsible player. May be
null
if there is none
-
setDestroyer
Set the player that is responsible for the bed destruction.- Parameters:
player
- The responsible player. May benull
if there is none
-
getDestroyerName
Get the explicit name of the thing that broke it (e.g. TNT).Tries to fallback to e.g. the player name if none is given.
- Returns:
- The name of the thing that broke it. May be
null
-
setDestroyerName
Set the explicit name of the thing that broke it (e.g. TNT).Tries to fallback to e.g. the player name if none is given.
- Parameters:
name
- The name of the thing that broke it. May benull
-
isPlayingSound
public boolean isPlayingSound()Get whether a sound shall be played.This is enabled by default.
- Returns:
- Whether a sound shall be played
-
setPlayingSound
public void setPlayingSound(boolean playSound) Set whether a sound shall be played.This is enabled by default.
- Parameters:
playSound
- Whether a sound shall be played
-
isSendingTitle
public boolean isSendingTitle()Get whether a title shall be sent.This is enabled by default.
- Returns:
- Whether a title shall be sent
- See Also:
-
setSendingTitle
public void setSendingTitle(boolean sendTitle) Set whether a title shall be sent.This is enabled by default.
- Parameters:
sendTitle
- Whether a title shall be sent- See Also:
-
isSendingChatMessage
public boolean isSendingChatMessage()Get whether a chat message shall be sent.This is enabled by default
- Returns:
- Whether a chat message shall be sent
-
isSendingChatMessage
public void isSendingChatMessage(boolean sendMessage) Set whether a chat message shall be sent.This is enabled by default
- Parameters:
sendMessage
- Whether a chat message shall be sent
-
setCause
Set the specific cause or action of the bed destruction.- Parameters:
cause
- The cause
-
getCause
Get the specific cause or action of the bed destruction.- Returns:
- The cause
-
construct
Construct a new instance of this data container.- Parameters:
targetTeam
- The team of whom the bed shall be destroyed- Returns:
- A newly constructed instance
-