Interface Banner
- All Superinterfaces:
BlockState, Metadatable, Nameable, PersistentDataHolder, PersistentDataViewHolder, TileState
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPattern(@NotNull Pattern pattern) Adds a new pattern on top of the existing patterns@NotNull DyeColorReturns the base color for this banner@NotNull PatterngetPattern(int i) Returns the pattern at the specified indexReturns a list of patterns on this bannerintReturns the number of patterns on this banner@NotNull PatternremovePattern(int i) Removes the pattern at the specified indexvoidsetBaseColor(@NotNull DyeColor color) Sets the base color for this banner.voidsetPattern(int i, @NotNull Pattern pattern) Sets the pattern at the specified indexvoidsetPatterns(@NotNull List<Pattern> patterns) Sets the patterns used on this bannerMethods inherited from interface BlockState
copy, copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, isSuffocating, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface TileState
getPersistentDataContainer, isSnapshot
-
Method Details
-
getBaseColor
Returns the base color for this banner- Returns:
- the base color
- Since:
- 1.8
-
setBaseColor
Sets the base color for this banner. Only valid for shield pseudo banners, otherwise base depends on block type- Parameters:
color- the base color- Since:
- 1.8
-
getPatterns
-
setPatterns
-
addPattern
Adds a new pattern on top of the existing patterns- Parameters:
pattern- the new pattern to add- Since:
- 1.8
-
getPattern
Returns the pattern at the specified index- Parameters:
i- the index- Returns:
- the pattern
- Since:
- 1.8
-
removePattern
Removes the pattern at the specified index- Parameters:
i- the index- Returns:
- the removed pattern
- Since:
- 1.8
-
setPattern
Sets the pattern at the specified index- Parameters:
i- the indexpattern- the new pattern- Since:
- 1.8
-
numberOfPatterns
int numberOfPatterns()Returns the number of patterns on this banner- Returns:
- the number of patterns
- Since:
- 1.8
-