Record Class PlayerCreativeSettings
java.lang.Object
java.lang.Record
com.hypixel.hytale.server.core.modules.entity.player.PlayerCreativeSettings
public record PlayerCreativeSettings(boolean allowNPCDetection, boolean respondToHit)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theallowNPCDetectionrecord component.private final booleanThe field for therespondToHitrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerCreativeSettings(boolean allowNPCDetection, boolean respondToHit) Creates an instance of aPlayerCreativeSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowNPCDetectionrecord component.clone()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of therespondToHitrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
allowNPCDetection
private final boolean allowNPCDetectionThe field for theallowNPCDetectionrecord component. -
respondToHit
private final boolean respondToHitThe field for therespondToHitrecord component.
-
-
Constructor Details
-
PlayerCreativeSettings
public PlayerCreativeSettings() -
PlayerCreativeSettings
public PlayerCreativeSettings(boolean allowNPCDetection, boolean respondToHit) Creates an instance of aPlayerCreativeSettingsrecord class.- Parameters:
allowNPCDetection- the value for theallowNPCDetectionrecord componentrespondToHit- the value for therespondToHitrecord component
-
-
Method Details
-
clone
-
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 with '=='. -
allowNPCDetection
public boolean allowNPCDetection()Returns the value of theallowNPCDetectionrecord component.- Returns:
- the value of the
allowNPCDetectionrecord component
-
respondToHit
public boolean respondToHit()Returns the value of therespondToHitrecord component.- Returns:
- the value of the
respondToHitrecord component
-