Class BannerBuilder

java.lang.Object
io.rhythmknights.coreapi.modal.builder.item.BaseItemBuilder<BannerBuilder>
io.rhythmknights.coreapi.modal.builder.item.BannerBuilder

public final class BannerBuilder extends BaseItemBuilder<BannerBuilder>
Item builder for banners only
Since:
3.0.1
  • Method Details

    • baseColor

      @NotNull @Contract("_ -> this") public @NotNull BannerBuilder baseColor(@NotNull @NotNull org.bukkit.DyeColor color)
      Sets the base color for this banner Note: This method is only available in older versions of Bukkit. In newer versions, use different banner materials for different colors.
      Parameters:
      color - the base color
      Returns:
      BannerBuilder
      Since:
      3.0.1
    • pattern

      @NotNull @Contract("_, _ -> this") public @NotNull BannerBuilder pattern(@NotNull @NotNull org.bukkit.DyeColor color, @NotNull @NotNull org.bukkit.block.banner.PatternType pattern)
      Adds a new pattern on top of the existing patterns
      Parameters:
      color - the pattern color
      pattern - the pattern type
      Returns:
      BannerBuilder
      Since:
      3.0.1
    • pattern

      @NotNull @Contract("_ -> this") public @NotNull BannerBuilder pattern(@NotNull @NotNull org.bukkit.block.banner.Pattern... pattern)
      Adds new patterns on top of the existing patterns
      Parameters:
      pattern - the patterns
      Returns:
      BannerBuilder
      Since:
      3.0.1
    • pattern

      @NotNull @Contract("_ -> this") public @NotNull BannerBuilder pattern(@NotNull @NotNull List<org.bukkit.block.banner.Pattern> patterns)
      Adds new patterns on top of the existing patterns
      Parameters:
      patterns - the patterns
      Returns:
      BannerBuilder
      Since:
      3.0.1
    • pattern

      @NotNull @Contract("_, _, _ -> this") public @NotNull BannerBuilder pattern(int index, @NotNull @NotNull org.bukkit.DyeColor color, @NotNull @NotNull org.bukkit.block.banner.PatternType pattern)
      Sets the pattern at the specified index
      Parameters:
      index - the index
      color - the pattern color
      pattern - the pattern type
      Returns:
      BannerBuilder
      Throws:
      IndexOutOfBoundsException - when index is not in [0, BannerMeta.numberOfPatterns()) range
      Since:
      3.0.1
    • pattern

      @NotNull @Contract("_, _ -> this") public @NotNull BannerBuilder pattern(int index, @NotNull @NotNull org.bukkit.block.banner.Pattern pattern)
      Sets the pattern at the specified index
      Parameters:
      index - the index
      pattern - the new pattern
      Returns:
      BannerBuilder
      Throws:
      IndexOutOfBoundsException - when index is not in [0, BannerMeta.numberOfPatterns()) range
      Since:
      3.0.1
    • setPatterns

      @NotNull @Contract("_ -> this") public @NotNull BannerBuilder setPatterns(@NotNull @NotNull List<@NotNull org.bukkit.block.banner.Pattern> patterns)
      Sets the patterns used on this banner
      Parameters:
      patterns - the new list of patterns
      Returns:
      BannerBuilder
      Since:
      3.0.1