Class TeamMock
java.lang.Object
be.seeseemelk.mockbukkit.scoreboard.TeamMock
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.audience.ForwardingAudience,net.kyori.adventure.pointer.Pointered,org.bukkit.scoreboard.Team
Mock implementation of a
Team.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.SingleNested classes/interfaces inherited from interface org.bukkit.scoreboard.Team
org.bukkit.scoreboard.Team.Option, org.bukkit.scoreboard.Team.OptionStatus -
Constructor Summary
ConstructorsConstructorDescriptionTeamMock(@NotNull String name, ScoreboardMock board) Constructs a newTeamMockfor the providedScoreboardMockwith the specified name. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntities(@NotNull Collection<org.bukkit.entity.Entity> entities) voidaddEntity(@NotNull org.bukkit.entity.Entity entity) voidaddEntries(@NotNull Collection<String> entries) voidvoidaddPlayer(@NotNull org.bukkit.OfflinePlayer offlinePlayer) Deprecated.boolean@NotNull Iterable<? extends net.kyori.adventure.audience.Audience> booleanvoidThrows an exception if the team is not registered.@NotNull net.kyori.adventure.text.format.TextColorcolor()voidcolor(@Nullable net.kyori.adventure.text.format.NamedTextColor color) @NotNull net.kyori.adventure.text.ComponentvoiddisplayName(@Nullable net.kyori.adventure.text.Component displayName) @NotNull org.bukkit.ChatColorgetColor()@NotNull String@NotNull StringgetName()@NotNull org.bukkit.scoreboard.NameTagVisibilityDeprecated.@NotNull org.bukkit.scoreboard.Team.OptionStatusgetOption(@NotNull org.bukkit.scoreboard.Team.Option option) @NotNull Set<org.bukkit.OfflinePlayer> Deprecated.@NotNull Stringorg.bukkit.scoreboard.ScoreboardintgetSize()@NotNull StringbooleanhasColor()booleanhasEntity(@NotNull org.bukkit.entity.Entity entity) booleanbooleanhasPlayer(@NotNull org.bukkit.OfflinePlayer offlinePlayer) Deprecated.@NotNull net.kyori.adventure.text.Componentprefix()voidprefix(@Nullable net.kyori.adventure.text.Component prefix) booleanremoveEntities(@NotNull Collection<org.bukkit.entity.Entity> entities) booleanremoveEntity(@NotNull org.bukkit.entity.Entity entity) booleanremoveEntries(@NotNull Collection<String> entries) booleanremoveEntry(@NotNull String entry) booleanremovePlayer(@NotNull org.bukkit.OfflinePlayer offlinePlayer) Deprecated.voidsetAllowFriendlyFire(boolean b) voidsetCanSeeFriendlyInvisibles(boolean b) voidsetColor(@NotNull org.bukkit.ChatColor chatColor) voidsetDisplayName(@NotNull String displayName) voidsetNameTagVisibility(@NotNull org.bukkit.scoreboard.NameTagVisibility nameTagVisibility) Deprecated.voidsetOption(@NotNull org.bukkit.scoreboard.Team.Option option, @NotNull org.bukkit.scoreboard.Team.OptionStatus optionStatus) voidvoid@NotNull net.kyori.adventure.text.Componentsuffix()voidsuffix(@Nullable net.kyori.adventure.text.Component suffix) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearResourcePacks, clearTitle, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFromMethods inherited from interface org.bukkit.scoreboard.Team
addEntities, addEntries, removeEntities, removeEntries
-
Constructor Details
-
TeamMock
Constructs a newTeamMockfor the providedScoreboardMockwith the specified name.- Parameters:
name- The name of the team.board- The scoreboard the team is for.
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
displayName
@NotNull public @NotNull net.kyori.adventure.text.Component displayName() throws IllegalStateException- Specified by:
displayNamein interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
displayName
public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException - Specified by:
displayNamein interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
prefix
- Specified by:
prefixin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
prefix
public void prefix(@Nullable @Nullable net.kyori.adventure.text.Component prefix) throws IllegalStateException, IllegalArgumentException - Specified by:
prefixin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
suffix
- Specified by:
suffixin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
suffix
public void suffix(@Nullable @Nullable net.kyori.adventure.text.Component suffix) throws IllegalStateException, IllegalArgumentException - Specified by:
suffixin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
hasColor
public boolean hasColor()- Specified by:
hasColorin interfaceorg.bukkit.scoreboard.Team
-
color
@NotNull public @NotNull net.kyori.adventure.text.format.TextColor color() throws IllegalStateException- Specified by:
colorin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
color
public void color(@Nullable @Nullable net.kyori.adventure.text.format.NamedTextColor color) - Specified by:
colorin interfaceorg.bukkit.scoreboard.Team
-
getDisplayName
- Specified by:
getDisplayNamein interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
setDisplayName
- Specified by:
setDisplayNamein interfaceorg.bukkit.scoreboard.Team
-
getPrefix
- Specified by:
getPrefixin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
setPrefix
- Specified by:
setPrefixin interfaceorg.bukkit.scoreboard.Team
-
getSuffix
- Specified by:
getSuffixin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
setSuffix
- Specified by:
setSuffixin interfaceorg.bukkit.scoreboard.Team
-
getColor
- Specified by:
getColorin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
setColor
public void setColor(@NotNull @NotNull org.bukkit.ChatColor chatColor) - Specified by:
setColorin interfaceorg.bukkit.scoreboard.Team
-
allowFriendlyFire
- Specified by:
allowFriendlyFirein interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
setAllowFriendlyFire
- Specified by:
setAllowFriendlyFirein interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
canSeeFriendlyInvisibles
- Specified by:
canSeeFriendlyInvisiblesin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
setCanSeeFriendlyInvisibles
- Specified by:
setCanSeeFriendlyInvisiblesin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
getNameTagVisibility
@Deprecated(since="1.9") @NotNull public @NotNull org.bukkit.scoreboard.NameTagVisibility getNameTagVisibility()Deprecated.- Specified by:
getNameTagVisibilityin interfaceorg.bukkit.scoreboard.Team
-
setNameTagVisibility
@Deprecated(since="1.9") public void setNameTagVisibility(@NotNull @NotNull org.bukkit.scoreboard.NameTagVisibility nameTagVisibility) Deprecated.- Specified by:
setNameTagVisibilityin interfaceorg.bukkit.scoreboard.Team
-
getPlayers
@Deprecated(since="1.8.7") @NotNull public @NotNull Set<org.bukkit.OfflinePlayer> getPlayers() throws IllegalStateExceptionDeprecated.- Specified by:
getPlayersin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
getEntries
- Specified by:
getEntriesin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
getSize
- Specified by:
getSizein interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
getScoreboard
public org.bukkit.scoreboard.Scoreboard getScoreboard()- Specified by:
getScoreboardin interfaceorg.bukkit.scoreboard.Team
-
addPlayer
@Deprecated(since="1.8.7") public void addPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer) Deprecated.- Specified by:
addPlayerin interfaceorg.bukkit.scoreboard.Team
-
addEntry
- Specified by:
addEntryin interfaceorg.bukkit.scoreboard.Team
-
addEntities
public void addEntities(@NotNull @NotNull Collection<org.bukkit.entity.Entity> entities) throws IllegalStateException, IllegalArgumentException - Specified by:
addEntitiesin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
addEntries
public void addEntries(@NotNull @NotNull Collection<String> entries) throws IllegalStateException, IllegalArgumentException - Specified by:
addEntriesin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
removePlayer
@Deprecated(since="1.8.7") public boolean removePlayer(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer) Deprecated.- Specified by:
removePlayerin interfaceorg.bukkit.scoreboard.Team
-
removeEntry
- Specified by:
removeEntryin interfaceorg.bukkit.scoreboard.Team
-
removeEntities
public boolean removeEntities(@NotNull @NotNull Collection<org.bukkit.entity.Entity> entities) throws IllegalStateException, IllegalArgumentException - Specified by:
removeEntitiesin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
removeEntries
public boolean removeEntries(@NotNull @NotNull Collection<String> entries) throws IllegalStateException, IllegalArgumentException - Specified by:
removeEntriesin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
unregister
- Specified by:
unregisterin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
hasPlayer
@Deprecated(since="1.8.7") public boolean hasPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer) Deprecated.- Specified by:
hasPlayerin interfaceorg.bukkit.scoreboard.Team
-
hasEntry
- Specified by:
hasEntryin interfaceorg.bukkit.scoreboard.Team
-
getOption
@NotNull public @NotNull org.bukkit.scoreboard.Team.OptionStatus getOption(@NotNull @NotNull org.bukkit.scoreboard.Team.Option option) throws IllegalStateException - Specified by:
getOptionin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
setOption
public void setOption(@NotNull @NotNull org.bukkit.scoreboard.Team.Option option, @NotNull @NotNull org.bukkit.scoreboard.Team.OptionStatus optionStatus) throws IllegalStateException - Specified by:
setOptionin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateException
-
addEntity
public void addEntity(@NotNull @NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException - Specified by:
addEntityin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
removeEntity
public boolean removeEntity(@NotNull @NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException - Specified by:
removeEntityin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
hasEntity
public boolean hasEntity(@NotNull @NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException - Specified by:
hasEntityin interfaceorg.bukkit.scoreboard.Team- Throws:
IllegalStateExceptionIllegalArgumentException
-
checkRegistered
public void checkRegistered()Throws an exception if the team is not registered. -
audiences
- Specified by:
audiencesin interfacenet.kyori.adventure.audience.ForwardingAudience
-