Package devs.beer.nativepackets.api
Record Class NativePlayerAbilities
java.lang.Object
java.lang.Record
devs.beer.nativepackets.api.NativePlayerAbilities
public record NativePlayerAbilities(boolean invulnerable, boolean flying, boolean allowFlying, boolean creativeMode, float flyingSpeed, float walkingSpeed)
extends Record
Complete client player-abilities state.
-
Constructor Summary
ConstructorsConstructorDescriptionNativePlayerAbilities(boolean invulnerable, boolean flying, boolean allowFlying, boolean creativeMode, float flyingSpeed, float walkingSpeed) Creates an instance of aNativePlayerAbilitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowFlyingrecord component.booleanReturns the value of thecreativeModerecord component.final booleanIndicates whether some other object is "equal to" this one.booleanflying()Returns the value of theflyingrecord component.floatReturns the value of theflyingSpeedrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinvulnerablerecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thewalkingSpeedrecord component.
-
Constructor Details
-
NativePlayerAbilities
public NativePlayerAbilities(boolean invulnerable, boolean flying, boolean allowFlying, boolean creativeMode, float flyingSpeed, float walkingSpeed) Creates an instance of aNativePlayerAbilitiesrecord class.- Parameters:
invulnerable- the value for theinvulnerablerecord componentflying- the value for theflyingrecord componentallowFlying- the value for theallowFlyingrecord componentcreativeMode- the value for thecreativeModerecord componentflyingSpeed- the value for theflyingSpeedrecord componentwalkingSpeed- the value for thewalkingSpeedrecord component
-
-
Method Details
-
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 '=='. -
invulnerable
public boolean invulnerable()Returns the value of theinvulnerablerecord component.- Returns:
- the value of the
invulnerablerecord component
-
flying
public boolean flying()Returns the value of theflyingrecord component.- Returns:
- the value of the
flyingrecord component
-
allowFlying
public boolean allowFlying()Returns the value of theallowFlyingrecord component.- Returns:
- the value of the
allowFlyingrecord component
-
creativeMode
public boolean creativeMode()Returns the value of thecreativeModerecord component.- Returns:
- the value of the
creativeModerecord component
-
flyingSpeed
public float flyingSpeed()Returns the value of theflyingSpeedrecord component.- Returns:
- the value of the
flyingSpeedrecord component
-
walkingSpeed
public float walkingSpeed()Returns the value of thewalkingSpeedrecord component.- Returns:
- the value of the
walkingSpeedrecord component
-