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
ConstructorDescriptionHitBox(org.bukkit.Location bottomLeft, org.bukkit.Location topRight)
Creates an instance of aHitBox
record class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Location
Returns the value of thebottomLeft
record component.boolean
contains(org.bukkit.Location loc)
boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.org.bukkit.Location
topRight()
Returns the value of thetopRight
record 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 aHitBox
record class.- Parameters:
bottomLeft
- the value for thebottomLeft
record componenttopRight
- the value for thetopRight
record 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 thebottomLeft
record component.- Returns:
- the value of the
bottomLeft
record component
-
topRight
public org.bukkit.Location topRight()Returns the value of thetopRight
record component.- Returns:
- the value of the
topRight
record component
-