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,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
Team.Option, 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<Entity> entities) voidvoidaddEntries(@NotNull Collection<String> entries) voidvoidaddPlayer(@NotNull 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 ChatColorgetColor()@NotNull String@NotNull StringgetName()@NotNull NameTagVisibilityDeprecated.@NotNull Team.OptionStatusgetOption(@NotNull Team.Option option) @NotNull Set<OfflinePlayer> Deprecated.@NotNull StringintgetSize()@NotNull StringbooleanhasColor()booleanbooleanbooleanhasPlayer(@NotNull OfflinePlayer offlinePlayer) Deprecated.@NotNull net.kyori.adventure.text.Componentprefix()voidprefix(@Nullable net.kyori.adventure.text.Component prefix) booleanremoveEntities(@NotNull Collection<Entity> entities) booleanremoveEntity(@NotNull Entity entity) booleanremoveEntries(@NotNull Collection<String> entries) booleanremoveEntry(@NotNull String entry) booleanremovePlayer(@NotNull OfflinePlayer offlinePlayer) Deprecated.voidsetAllowFriendlyFire(boolean b) voidsetCanSeeFriendlyInvisibles(boolean b) voidvoidsetDisplayName(@NotNull String displayName) voidsetNameTagVisibility(@NotNull NameTagVisibility nameTagVisibility) Deprecated.voidsetOption(@NotNull Team.Option option, @NotNull 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 interfaceTeam- Throws:
IllegalStateException
-
displayName
@NotNull public @NotNull net.kyori.adventure.text.Component displayName() throws IllegalStateException- Specified by:
displayNamein interfaceTeam- Throws:
IllegalStateException
-
displayName
public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException - Specified by:
displayNamein interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
prefix
- Specified by:
prefixin interfaceTeam- Throws:
IllegalStateException
-
prefix
public void prefix(@Nullable @Nullable net.kyori.adventure.text.Component prefix) throws IllegalStateException, IllegalArgumentException - Specified by:
prefixin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
suffix
- Specified by:
suffixin interfaceTeam- Throws:
IllegalStateException
-
suffix
public void suffix(@Nullable @Nullable net.kyori.adventure.text.Component suffix) throws IllegalStateException, IllegalArgumentException - Specified by:
suffixin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
hasColor
public boolean hasColor() -
color
@NotNull public @NotNull net.kyori.adventure.text.format.TextColor color() throws IllegalStateException- Specified by:
colorin interfaceTeam- Throws:
IllegalStateException
-
color
public void color(@Nullable @Nullable net.kyori.adventure.text.format.NamedTextColor color) -
getDisplayName
- Specified by:
getDisplayNamein interfaceTeam- Throws:
IllegalStateException
-
setDisplayName
- Specified by:
setDisplayNamein interfaceTeam
-
getPrefix
- Specified by:
getPrefixin interfaceTeam- Throws:
IllegalStateException
-
setPrefix
-
getSuffix
- Specified by:
getSuffixin interfaceTeam- Throws:
IllegalStateException
-
setSuffix
-
getColor
- Specified by:
getColorin interfaceTeam- Throws:
IllegalStateException
-
setColor
-
allowFriendlyFire
- Specified by:
allowFriendlyFirein interfaceTeam- Throws:
IllegalStateException
-
setAllowFriendlyFire
- Specified by:
setAllowFriendlyFirein interfaceTeam- Throws:
IllegalStateException
-
canSeeFriendlyInvisibles
- Specified by:
canSeeFriendlyInvisiblesin interfaceTeam- Throws:
IllegalStateException
-
setCanSeeFriendlyInvisibles
- Specified by:
setCanSeeFriendlyInvisiblesin interfaceTeam- Throws:
IllegalStateException
-
getNameTagVisibility
Deprecated.- Specified by:
getNameTagVisibilityin interfaceTeam
-
setNameTagVisibility
@Deprecated(since="1.9") public void setNameTagVisibility(@NotNull @NotNull NameTagVisibility nameTagVisibility) Deprecated.- Specified by:
setNameTagVisibilityin interfaceTeam
-
getPlayers
@Deprecated(since="1.8.7") @NotNull public @NotNull Set<OfflinePlayer> getPlayers() throws IllegalStateExceptionDeprecated.- Specified by:
getPlayersin interfaceTeam- Throws:
IllegalStateException
-
getEntries
- Specified by:
getEntriesin interfaceTeam- Throws:
IllegalStateException
-
getSize
- Specified by:
getSizein interfaceTeam- Throws:
IllegalStateException
-
getScoreboard
- Specified by:
getScoreboardin interfaceTeam
-
addPlayer
Deprecated. -
addEntry
-
addEntities
public void addEntities(@NotNull @NotNull Collection<Entity> entities) throws IllegalStateException, IllegalArgumentException - Specified by:
addEntitiesin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
addEntries
public void addEntries(@NotNull @NotNull Collection<String> entries) throws IllegalStateException, IllegalArgumentException - Specified by:
addEntriesin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
removePlayer
@Deprecated(since="1.8.7") public boolean removePlayer(@NotNull @NotNull OfflinePlayer offlinePlayer) Deprecated.- Specified by:
removePlayerin interfaceTeam
-
removeEntry
- Specified by:
removeEntryin interfaceTeam
-
removeEntities
public boolean removeEntities(@NotNull @NotNull Collection<Entity> entities) throws IllegalStateException, IllegalArgumentException - Specified by:
removeEntitiesin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
removeEntries
public boolean removeEntries(@NotNull @NotNull Collection<String> entries) throws IllegalStateException, IllegalArgumentException - Specified by:
removeEntriesin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
unregister
- Specified by:
unregisterin interfaceTeam- Throws:
IllegalStateException
-
hasPlayer
Deprecated. -
hasEntry
-
getOption
@NotNull public @NotNull Team.OptionStatus getOption(@NotNull @NotNull Team.Option option) throws IllegalStateException - Specified by:
getOptionin interfaceTeam- Throws:
IllegalStateException
-
setOption
public void setOption(@NotNull @NotNull Team.Option option, @NotNull @NotNull Team.OptionStatus optionStatus) throws IllegalStateException - Specified by:
setOptionin interfaceTeam- Throws:
IllegalStateException
-
addEntity
public void addEntity(@NotNull @NotNull Entity entity) throws IllegalStateException, IllegalArgumentException - Specified by:
addEntityin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
removeEntity
public boolean removeEntity(@NotNull @NotNull Entity entity) throws IllegalStateException, IllegalArgumentException - Specified by:
removeEntityin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
hasEntity
public boolean hasEntity(@NotNull @NotNull Entity entity) throws IllegalStateException, IllegalArgumentException - Specified by:
hasEntityin interfaceTeam- Throws:
IllegalStateExceptionIllegalArgumentException
-
checkRegistered
public void checkRegistered()Throws an exception if the team is not registered. -
audiences
- Specified by:
audiencesin interfacenet.kyori.adventure.audience.ForwardingAudience
-