Package kr.toxicity.hud.api.player
Record Class PointedLocation
java.lang.Object
java.lang.Record
kr.toxicity.hud.api.player.PointedLocation
- Record Components:
source- sourcename- nameicon- pointer namelocation- location
public record PointedLocation(@NotNull PointedLocationSource source, @NotNull String name, @Nullable String icon, @NotNull LocationWrapper location)
extends Record
Location with source and name.
-
Constructor Summary
ConstructorsConstructorDescriptionPointedLocation(@NotNull PointedLocationSource source, @NotNull String name, @Nullable String icon, @NotNull LocationWrapper location) Creates an instance of aPointedLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PointedLocationdeserialize(@NotNull com.google.gson.JsonObject data) Finds location from JSON.static @NotNull PointedLocationdeserialize(@NotNull YamlObject data) Finds location from YAML.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@Nullable Stringicon()Returns the value of theiconrecord component.@NotNull LocationWrapperlocation()Returns the value of thelocationrecord component.@NotNull Stringname()Returns the value of thenamerecord component.Serializes to map.@NotNull PointedLocationSourcesource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PointedLocation
public PointedLocation(@NotNull @NotNull PointedLocationSource source, @NotNull @NotNull String name, @Nullable @Nullable String icon, @NotNull @NotNull LocationWrapper location) Creates an instance of aPointedLocationrecord class.
-
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
deserialize
Finds location from YAML.- Parameters:
data- raw data- Returns:
- location
-
deserialize
@NotNull public static @NotNull PointedLocation deserialize(@NotNull @NotNull com.google.gson.JsonObject data) Finds location from JSON.- Parameters:
data- raw data- Returns:
- location
-
serialize
Serializes to map.- Returns:
- map
-
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. -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-