Record Class MmcEntity
java.lang.Object
java.lang.Record
fr.multimc.api.spigot.common.entities.MmcEntity
public record MmcEntity(@NotNull org.bukkit.entity.EntityType entityType, @NotNull RelativeLocation location)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMmcEntity(@NotNull org.bukkit.entity.EntityType entityType, @NotNull RelativeLocation location) Creates an instance of aMmcEntityrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.entity.EntityTypeReturns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull RelativeLocationlocation()Returns the value of thelocationrecord component.org.bukkit.entity.Entityspawn(@NotNull org.bukkit.Location instanceLocation, int instanceId) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MmcEntity
public MmcEntity(@NotNull @NotNull org.bukkit.entity.EntityType entityType, @NotNull @NotNull RelativeLocation location) Creates an instance of aMmcEntityrecord class.- Parameters:
entityType- the value for theentityTyperecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
spawn
public org.bukkit.entity.Entity spawn(@NotNull @NotNull org.bukkit.Location instanceLocation, int instanceId) -
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). -
entityType
@NotNull public @NotNull org.bukkit.entity.EntityType entityType()Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-