Class Business.Builder

java.lang.Object
us.teaminceptus.novaconomy.api.business.Business.Builder
Enclosing class:
Business

public static final class Business.Builder extends Object
Represents a Business Builder
  • Method Details

    • setName

      public Business.Builder setName(@Nullable @Nullable String name)
      Sets the Business Name.
      Parameters:
      name - Name of Business
      Returns:
      this builder, for chaining
    • setIcon

      public Business.Builder setIcon(@Nullable @Nullable Material icon)
      Sets the Business's Material Icon.
      Parameters:
      icon - Material Icon
      Returns:
      this builder, for chaining
    • setOwner

      public Business.Builder setOwner(@Nullable @Nullable OfflinePlayer owner)
      Set the Business's Owner.
      Parameters:
      owner - Owner of Business
      Returns:
      this builder, for chaining
    • setSetting

      public <T> Business.Builder setSetting(@NotNull Settings.Business<T> setting, T value)
      Sets a setting for the Business.
      Parameters:
      setting - Setting to set
      value - Value to set
      Returns:
      this builder, for chaining
    • setKeywords

      public Business.Builder setKeywords(@Nullable @Nullable Collection<String> keywords)
      Sets the Business's Keywords.
      Parameters:
      keywords - Keywords to set
      Returns:
      this builder, for chaining
    • setKeywords

      public Business.Builder setKeywords(@Nullable @Nullable String... keywords)
      Sets the Business's Keywords.
      Parameters:
      keywords - Keywords to set
      Returns:
      this builder, for chaining
    • addKeywords

      public Business.Builder addKeywords(@Nullable @Nullable String... keywords)
      Adds an array of keywords to the Business.
      Parameters:
      keywords - Keywords to add
      Returns:
      this builder, for chaining
    • addKeywords

      public Business.Builder addKeywords(@Nullable @Nullable Collection<String> keywords)
      Adds a collection of Keywords to the Business.
      Parameters:
      keywords - Keywords to add
      Returns:
      this builder, for chaining
    • build

      @NotNull public @NotNull Business build() throws IllegalArgumentException, UnsupportedOperationException
      Builds a Novaconomy Business.
      Returns:
      Built Novaconomy Business
      Throws:
      IllegalArgumentException - if a part is missing or is null
      UnsupportedOperationException - if Business exists via name or owner