Package dev.itsharshxd.zentrix.api.phase
Class PhaseBuilder.BorderConfigBuilder
java.lang.Object
dev.itsharshxd.zentrix.api.phase.PhaseBuilder.BorderConfigBuilder
- Enclosing class:
PhaseBuilder
Builder for configuring border settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PhaseBuilder.BorderConfigBuildercopy()Creates a copy of this border config builder.@NotNull PhaseBuilder.BorderConfigBuilderdamagePerBlock(double damage) Sets the damage dealt per block when outside the border.@NotNull PhaseBuilder.BorderConfigBuilderdoShrinkage(boolean doShrinkage) Sets whether the border shrinks during this phase.doubleintdoubleintboolean@NotNull PhaseBuilder.BorderConfigBuildershrinkDuration(int seconds) Sets the duration of the border shrink animation.@NotNull PhaseBuilder.BorderConfigBuildershrinkTo(double size) Sets the target border size after shrinkage.voidvalidate()Validates the border configuration.@NotNull PhaseBuilder.BorderConfigBuilderwarningTime(int seconds) Sets the warning time before the phase ends.
-
Constructor Details
-
BorderConfigBuilder
public BorderConfigBuilder()
-
-
Method Details
-
doShrinkage
Sets whether the border shrinks during this phase.- Parameters:
doShrinkage-trueto enable shrinkage- Returns:
- This builder for chaining
-
shrinkTo
Sets the target border size after shrinkage.- Parameters:
size- The target diameter in blocks- Returns:
- This builder for chaining
-
shrinkDuration
Sets the duration of the border shrink animation.- Parameters:
seconds- The shrink duration in seconds- Returns:
- This builder for chaining
-
damagePerBlock
Sets the damage dealt per block when outside the border.- Parameters:
damage- Damage per block per second- Returns:
- This builder for chaining
-
warningTime
Sets the warning time before the phase ends.- Parameters:
seconds- Seconds before phase ends to show warning- Returns:
- This builder for chaining
-
validate
Validates the border configuration.- Throws:
IllegalStateException- if the configuration is invalid
-
copy
Creates a copy of this border config builder.- Returns:
- A new BorderConfigBuilder with the same settings
-
isDoShrinkage
public boolean isDoShrinkage() -
getShrinkTo
public double getShrinkTo() -
getShrinkDuration
public int getShrinkDuration() -
getDamagePerBlock
public double getDamagePerBlock() -
getWarningTime
public int getWarningTime()
-