Class BedRule.Builder
java.lang.Object
dev.wyck.wrapper.environment.BedRule.Builder
- Enclosing interface:
BedRule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the BedRule instance.setCanSetSpawn(BedRule.Rule canSetSpawn) Sets the rule for setting the spawn point using the bed.setCanSleep(BedRule.Rule canSleep) Sets the rule for sleeping in the bed.setErrorMessage(@Nullable Component errorMessage) Sets the error message displayed when a player tries to use the bed inappropriately.setExplodes(boolean explodes) Sets whether the bed explodes when used in this environment.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
setCanSleep
Sets the rule for sleeping in the bed.- Parameters:
canSleep- the rule for sleeping in the bed- Returns:
- this builder, for chaining
- Since:
- 1.1.0
-
setCanSetSpawn
Sets the rule for setting the spawn point using the bed.- Parameters:
canSetSpawn- the rule for setting the spawn point using the bed- Returns:
- this builder, for chaining
- Since:
- 1.1.0
-
setExplodes
Sets whether the bed explodes when used in this environment.- Parameters:
explodes- whether the bed explodes when used in this environment- Returns:
- this builder, for chaining
- Since:
- 1.1.0
-
setErrorMessage
Sets the error message displayed when a player tries to use the bed inappropriately.- Parameters:
errorMessage- the error message displayed when a player tries to use the bed inappropriately, or null to remove the error message- Returns:
- this builder, for chaining
- Since:
- 1.1.0
-
build
-