Package kr.toxicity.model.api.player
Record Class PlayerSkinParts
java.lang.Object
java.lang.Record
kr.toxicity.model.api.player.PlayerSkinParts
- Record Components:
bitmask- bit mask
Player skin parts
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PlayerSkinPartsThe default skin parts configuration where all parts (Cape, Jacket, Sleeves, Pants, Hat) are visible. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerSkinParts(int bitmask) Creates an instance of aPlayerSkinPartsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbitmask()Returns the value of thebitmaskrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if the 'Cape' part of the player's skin is enabled (visible).booleanChecks if the 'Hat' (or head overlay) part of the player's skin is enabled (visible).booleanChecks if the 'Jacket' part of the player's skin is enabled (visible).booleanChecks if the 'Left Pants Leg' part of the player's skin is enabled (visible).booleanChecks if the 'Left Sleeve' part of the player's skin is enabled (visible).booleanChecks if the 'Right Pants Leg' part of the player's skin is enabled (visible).booleanChecks if the 'Right Sleeve' part of the player's skin is enabled (visible).final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
The default skin parts configuration where all parts (Cape, Jacket, Sleeves, Pants, Hat) are visible.
-
-
Constructor Details
-
PlayerSkinParts
public PlayerSkinParts(int bitmask) Creates an instance of aPlayerSkinPartsrecord class.- Parameters:
bitmask- the value for thebitmaskrecord component
-
-
Method Details
-
isCapeEnabled
public boolean isCapeEnabled()Checks if the 'Cape' part of the player's skin is enabled (visible).- Returns:
trueif the cape is enabled,falseotherwise.
-
isJacketEnabled
public boolean isJacketEnabled()Checks if the 'Jacket' part of the player's skin is enabled (visible).- Returns:
trueif the jacket is enabled,falseotherwise.
-
isLeftSleeveEnabled
public boolean isLeftSleeveEnabled()Checks if the 'Left Sleeve' part of the player's skin is enabled (visible).- Returns:
trueif the left sleeve is enabled,falseotherwise.
-
isRightSleeveEnabled
public boolean isRightSleeveEnabled()Checks if the 'Right Sleeve' part of the player's skin is enabled (visible).- Returns:
trueif the right sleeve is enabled,falseotherwise.
-
isLeftPantsEnabled
public boolean isLeftPantsEnabled()Checks if the 'Left Pants Leg' part of the player's skin is enabled (visible).- Returns:
trueif the left pants leg is enabled,falseotherwise.
-
isRightPantsEnabled
public boolean isRightPantsEnabled()Checks if the 'Right Pants Leg' part of the player's skin is enabled (visible).- Returns:
trueif the right pants leg is enabled,falseotherwise.
-
isHatEnabled
public boolean isHatEnabled()Checks if the 'Hat' (or head overlay) part of the player's skin is enabled (visible).- Returns:
trueif the hat is enabled,falseotherwise.
-
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 '=='. -
bitmask
public int bitmask()Returns the value of thebitmaskrecord component.- Returns:
- the value of the
bitmaskrecord component
-