Class BedRule.Builder
java.lang.Object
dev.wyck.environment.BedRule.Builder
- Enclosing interface:
BedRule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the BedRule instance.canSetSpawn(BedRule.Rule canSetSpawn) Sets the rule for setting the spawn point using the bed.canSleep(BedRule.Rule canSleep) Sets the rule for sleeping in the bed.errorMessage(@Nullable Component errorMessage) Sets the error message displayed when a player tries to use the bed inappropriately.explodes(boolean explodes) Sets whether the bed explodes when used in this environment.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
canSleep
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
-
canSetSpawn
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
-
explodes
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
-
errorMessage
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
-