Class FunctionEffect.Builder
java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.status.v2.effect.FunctionEffect.Builder
- Enclosing class:
FunctionEffect
Builder object for creating function effects.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a new function effect from this builder.withPermissionLevel(int value) Sets the permission level of the effect.withRemoveFunction(FunctionWithArguments removeFunction) Add a remove function.
-
Method Details
-
withRemoveFunction
Add a remove function.- Parameters:
removeFunction- A datapack function that handles cleanup logic.- Returns:
- Returns this builder.
- Throws:
NullPointerException- if theremoveFunctionisnull.
-
withPermissionLevel
Sets the permission level of the effect.- Parameters:
value- An int between 0 and 4 (inclusive)- Returns:
- Returns this builder.
- Throws:
IllegalArgumentException- if thevalueis not in the specified range.
-
build
Creates a new function effect from this builder.
-