Record Class ExplosionMetadata
java.lang.Object
java.lang.Record
com.djrapitops.plan.gathering.cache.ExplosionMetadata
-
Constructor Summary
ConstructorsConstructorDescriptionExplosionMetadata(String explosionBlockName, UUID playerUUID, String worldIdentifier, int x, int y, int z, long explosionTime) Creates an instance of aExplosionMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplosionBlockNamerecord component.longReturns the value of theexplosionTimerecord component.final inthashCode()Returns a hash code value for this object.booleanisRecent(long time) booleanisWithinRadius(double targetX, double targetY, double targetZ) Returns the value of theplayerUUIDrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworldIdentifierrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.intz()Returns the value of thezrecord component.
-
Constructor Details
-
ExplosionMetadata
public ExplosionMetadata(String explosionBlockName, UUID playerUUID, String worldIdentifier, int x, int y, int z, long explosionTime) Creates an instance of aExplosionMetadatarecord class.- Parameters:
explosionBlockName- the value for theexplosionBlockNamerecord componentplayerUUID- the value for theplayerUUIDrecord componentworldIdentifier- the value for theworldIdentifierrecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentexplosionTime- the value for theexplosionTimerecord component
-
-
Method Details
-
isWithinRadius
public boolean isWithinRadius(double targetX, double targetY, double targetZ) -
isRecent
public boolean isRecent(long time) -
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
explosionBlockName
Returns the value of theexplosionBlockNamerecord component.- Returns:
- the value of the
explosionBlockNamerecord component
-
playerUUID
Returns the value of theplayerUUIDrecord component.- Returns:
- the value of the
playerUUIDrecord component
-
worldIdentifier
Returns the value of theworldIdentifierrecord component.- Returns:
- the value of the
worldIdentifierrecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
explosionTime
public long explosionTime()Returns the value of theexplosionTimerecord component.- Returns:
- the value of the
explosionTimerecord component
-