Package me.despical.commons.util
Record Class WeakLocation
java.lang.Object
java.lang.Record
me.despical.commons.util.WeakLocation
- Author:
- Despical
Created at 27.07.2025
-
Constructor Summary
ConstructorsConstructorDescriptionWeakLocation(String worldName, org.bukkit.Location location) Creates an instance of aWeakLocationrecord class.WeakLocation(org.bukkit.Location location) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.org.bukkit.Locationget()final inthashCode()Returns a hash code value for this object.booleanisLoaded()org.bukkit.Locationlocation()Returns the value of thelocationrecord component.org.bukkit.LocationorElse(org.bukkit.Location location) voidteleportPlayer(@Nullable org.bukkit.entity.Player player) @NotNull StringtoString()Returns a string representation of this record class.Returns the value of theworldNamerecord component.
-
Constructor Details
-
WeakLocation
public WeakLocation(org.bukkit.Location location) -
WeakLocation
Creates an instance of aWeakLocationrecord class.- Parameters:
worldName- the value for theworldNamerecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
get
public org.bukkit.Location get() -
isLoaded
public boolean isLoaded() -
orElse
public org.bukkit.Location orElse(org.bukkit.Location location) -
teleportPlayer
public void teleportPlayer(@Nullable @Nullable org.bukkit.entity.Player player) -
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). -
worldName
Returns the value of theworldNamerecord component.- Returns:
- the value of the
worldNamerecord component
-
location
public org.bukkit.Location location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-