Class FunctionEffect.Builder

java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.status.v2.effect.FunctionEffect.Builder
Enclosing class:
FunctionEffect

public static final class FunctionEffect.Builder extends Object
Builder object for creating function effects.
  • Method Details

    • withRemoveFunction

      public FunctionEffect.Builder withRemoveFunction(FunctionWithArguments removeFunction)
      Add a remove function.
      Parameters:
      removeFunction - A datapack function that handles cleanup logic.
      Returns:
      Returns this builder.
      Throws:
      NullPointerException - if the removeFunction is null.
    • withPermissionLevel

      public FunctionEffect.Builder withPermissionLevel(int value)
      Sets the permission level of the effect.
      Parameters:
      value - An int between 0 and 4 (inclusive)
      Returns:
      Returns this builder.
      Throws:
      IllegalArgumentException - if the value is not in the specified range.
    • build

      public FunctionEffect build()
      Creates a new function effect from this builder.