Package io.github.nacvark.hudengine.api
Record Class HudCompass.CompassPoint
java.lang.Object
java.lang.Record
io.github.nacvark.hudengine.api.HudCompass.CompassPoint
- Record Components:
icon- acustom-iconkey from the compass definition, or null for the default markerradius- only show within this many blocks; zero means always
- Enclosing interface:
HudCompass
public static record HudCompass.CompassPoint(String world, double x, double y, double z, String icon, double radius)
extends Record
Somewhere a compass can point.
-
Constructor Summary
ConstructorsConstructorDescriptionCompassPoint(String world, double x, double y, double z, String icon, double radius) Creates an instance of aCompassPointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic HudCompass.CompassPointA point at a location, with height.final booleanIndicates whether some other object is "equal to" this one.static HudCompass.CompassPointA point with no height, which is always measured on the flat.final inthashCode()Returns a hash code value for this object.booleanWhether this point carries a height at all.icon()Returns the value of theiconrecord component.doubleradius()Returns the value of theradiusrecord component.final StringtoString()Returns a string representation of this record class.static HudCompass.CompassPointA point at a location that only appears withinradiusblocks.world()Returns the value of theworldrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doublez()Returns the value of thezrecord component.
-
Constructor Details
-
CompassPoint
Creates an instance of aCompassPointrecord class.
-
-
Method Details
-
flat
A point with no height, which is always measured on the flat. -
at
A point at a location, with height. -
within
public static HudCompass.CompassPoint within(org.bukkit.Location location, String icon, double radius) A point at a location that only appears withinradiusblocks. -
hasHeight
public boolean hasHeight()Whether this point carries a height at all. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
world
Returns the value of theworldrecord component.- Returns:
- the value of the
worldrecord component
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
radius
public double radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-