Package dev.cerus.maps.api
Record Class MapScreen.HitBox
java.lang.Object
java.lang.Record
dev.cerus.maps.api.MapScreen.HitBox
- Enclosing class:
- MapScreen
public static record MapScreen.HitBox(org.bukkit.Location bottomLeft, org.bukkit.Location topRight)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionHitBox(org.bukkit.Location bottomLeft, org.bukkit.Location topRight)Creates an instance of aHitBoxrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.LocationReturns the value of thebottomLeftrecord component.booleancontains(org.bukkit.Location loc)booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.org.bukkit.LocationtopRight()Returns the value of thetopRightrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
HitBox
public HitBox(org.bukkit.Location bottomLeft, org.bukkit.Location topRight)Creates an instance of aHitBoxrecord class.- Parameters:
bottomLeft- the value for thebottomLeftrecord componenttopRight- the value for thetopRightrecord component
-
-
Method Details
-
contains
public boolean contains(org.bukkit.Location loc) -
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 withObjects::equals(Object,Object). -
bottomLeft
public org.bukkit.Location bottomLeft()Returns the value of thebottomLeftrecord component.- Returns:
- the value of the
bottomLeftrecord component
-
topRight
public org.bukkit.Location topRight()Returns the value of thetopRightrecord component.- Returns:
- the value of the
topRightrecord component
-