Package dev.itsharshxd.zentrix.api.world
Record Class WorldBorderSnapshot
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.world.WorldBorderSnapshot
public record WorldBorderSnapshot(double diameter, double damageAmount, double damageBuffer, int warningDistance, int warningTime)
extends Record
Immutable snapshot of Bukkit world-border settings. Diameter, damage buffer,
and warning distance are measured in blocks; warning time is in seconds.
- Since:
- 1.3.0
-
Constructor Summary
ConstructorsConstructorDescriptionWorldBorderSnapshot(double diameter, double damageAmount, double damageBuffer, int warningDistance, int warningTime) Creates an instance of aWorldBorderSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedamageAmountrecord component.doubleReturns the value of thedamageBufferrecord component.doublediameter()Returns the value of thediameterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intReturns the value of thewarningDistancerecord component.intReturns the value of thewarningTimerecord component.
-
Constructor Details
-
WorldBorderSnapshot
public WorldBorderSnapshot(double diameter, double damageAmount, double damageBuffer, int warningDistance, int warningTime) Creates an instance of aWorldBorderSnapshotrecord class.- Parameters:
diameter- the value for thediameterrecord componentdamageAmount- the value for thedamageAmountrecord componentdamageBuffer- the value for thedamageBufferrecord componentwarningDistance- the value for thewarningDistancerecord componentwarningTime- the value for thewarningTimerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
diameter
public double diameter()Returns the value of thediameterrecord component.- Returns:
- the value of the
diameterrecord component
-
damageAmount
public double damageAmount()Returns the value of thedamageAmountrecord component.- Returns:
- the value of the
damageAmountrecord component
-
damageBuffer
public double damageBuffer()Returns the value of thedamageBufferrecord component.- Returns:
- the value of the
damageBufferrecord component
-
warningDistance
public int warningDistance()Returns the value of thewarningDistancerecord component.- Returns:
- the value of the
warningDistancerecord component
-
warningTime
public int warningTime()Returns the value of thewarningTimerecord component.- Returns:
- the value of the
warningTimerecord component
-