Record Class BukkitLocation
java.lang.Object
java.lang.Record
kr.toxicity.model.api.bukkit.platform.BukkitLocation
- Record Components:
source- the source Bukkit location
- All Implemented Interfaces:
kr.toxicity.model.api.platform.PlatformLocation,kr.toxicity.model.api.platform.PlatformRegionHolder
public record BukkitLocation(@NotNull org.bukkit.Location source)
extends Record
implements kr.toxicity.model.api.platform.PlatformLocation
Represents a Bukkit location wrapped as a
PlatformLocation.- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBukkitLocation(@NotNull org.bukkit.Location source) Creates an instance of aBukkitLocationrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull kr.toxicity.model.api.platform.PlatformLocationadd(double x, double y, double z) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatpitch()@NotNull org.bukkit.Locationsource()Returns the value of thesourcerecord component.@Nullable kr.toxicity.model.api.scheduler.ModelTask@Nullable kr.toxicity.model.api.scheduler.ModelTaskfinal StringtoString()Returns a string representation of this record class.@NotNull kr.toxicity.model.api.platform.PlatformWorldworld()doublex()doubley()floatyaw()doublez()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface kr.toxicity.model.api.platform.PlatformLocation
distance, distanceSquared
-
Constructor Details
-
BukkitLocation
public BukkitLocation(@NotNull @NotNull org.bukkit.Location source) Creates an instance of aBukkitLocationrecord class.- Parameters:
source- the value for thesourcerecord component
-
-
Method Details
-
world
@NotNull public @NotNull kr.toxicity.model.api.platform.PlatformWorld world()- Specified by:
worldin interfacekr.toxicity.model.api.platform.PlatformLocation
-
x
public double x()- Specified by:
xin interfacekr.toxicity.model.api.platform.PlatformLocation
-
y
public double y()- Specified by:
yin interfacekr.toxicity.model.api.platform.PlatformLocation
-
z
public double z()- Specified by:
zin interfacekr.toxicity.model.api.platform.PlatformLocation
-
pitch
public float pitch()- Specified by:
pitchin interfacekr.toxicity.model.api.platform.PlatformLocation
-
yaw
public float yaw()- Specified by:
yawin interfacekr.toxicity.model.api.platform.PlatformLocation
-
add
@NotNull public @NotNull kr.toxicity.model.api.platform.PlatformLocation add(double x, double y, double z) - Specified by:
addin interfacekr.toxicity.model.api.platform.PlatformLocation
-
task
@Nullable public @Nullable kr.toxicity.model.api.scheduler.ModelTask task(@NotNull @NotNull Runnable runnable) - Specified by:
taskin interfacekr.toxicity.model.api.platform.PlatformRegionHolder
-
taskLater
@Nullable public @Nullable kr.toxicity.model.api.scheduler.ModelTask taskLater(long delay, @NotNull @NotNull Runnable runnable) - Specified by:
taskLaterin interfacekr.toxicity.model.api.platform.PlatformRegionHolder
-
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). -
source
@NotNull public @NotNull org.bukkit.Location source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-