Player
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Extending LivingEntity
Player extends LivingEntity. That means all methods available in LivingEntity are also available in Player
Methods
Return Type: boolean
Parameter | Type |
---|---|
Parameter stack | Type ItemStack |
Parameter | Type |
---|---|
Parameter entity | Type Entity |
Parameter | Type |
---|---|
Parameter stat | Type ResourceLocation |
Parameter | Type |
---|---|
Parameter stat | Type ResourceLocation |
Parameter amount | Type int |
Return Type: boolean
Parameter | Type |
---|---|
Parameter ignoreHunger | Type boolean |
Return Type: boolean
Parameter | Type |
---|---|
Parameter player | Type Player |
Return Type: boolean
Parameter | Type |
---|---|
Parameter exhaustion | Type float |
Parameter | Type |
---|---|
Parameter entity | Type Entity |
Parameter | Type |
---|---|
Parameter usingAxe | Type boolean |
Parameter | Type |
---|---|
Parameter component | Type Component |
Parameter actionBar | Type boolean |
Return Type: ItemEntity?
Parameter | Type |
---|---|
Parameter stack | Type ItemStack |
Parameter traceItem | Type boolean |
Return Type: Abilities
Return Type: ItemCooldowns
Return Type: float
Return Type: float
Parameter | Type |
---|---|
Parameter state | Type BlockState |
Return Type: int
Return Type: int
Return Type: FoodData
Return Type: Inventory
Return Type: float
Return Type: HumanoidArm
Return Type: int
Return Type: MapData
Return Type: MapData
Return Type: int
Return Type: int
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter stack | Type IItemStack | Optional false | Default Value |
Parameter slot | Type int | Optional true | Default Value -1 |
Parameter | Type |
---|---|
Parameter levels | Type int |
Parameter | Type |
---|---|
Parameter amount | Type int |
Return Type: boolean
Parameter | Type |
---|---|
Parameter state | Type BlockState |
Parameter | Type |
---|---|
Parameter score | Type int |
Return Type: boolean
Return Type: boolean
Return Type: boolean
Return Type: boolean
Return Type: boolean
Return Type: boolean
Return Type: boolean
Parameter | Type |
---|---|
Parameter entity | Type Entity |
Return Type: boolean
Parameter | Type |
---|---|
Parameter event | Type SoundEvent |
Parameter source | Type SoundSource |
Parameter volume | Type float |
Parameter pitch | Type float |
Parameter | Type |
---|---|
Parameter text | Type Component |
Return Type: boolean
Parameter | Type |
---|---|
Parameter entityData | Type MapData |
Parameter | Type |
---|---|
Parameter level | Type int |
Parameter | Type |
---|---|
Parameter arm | Type HumanoidArm |
Parameter | Type |
---|---|
Parameter reducedDebugInfo | Type boolean |
Parameter | Type |
---|---|
Parameter score | Type int |
Properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name abilities | Type Abilities | Has Getter true | Has Setter false |
Name canUseGameMasterBlocks | Type boolean | Has Getter true | Has Setter false |
Name cooldowns | Type ItemCooldowns | Has Getter true | Has Setter false |
Name currentItemAttackStrengthDelay | Type float | Has Getter true | Has Setter false |
Name enchantmentSeed | Type int | Has Getter true | Has Setter false |
Name experienceLevel | Type int | Has Getter true | Has Setter true |
Name foodData | Type FoodData | Has Getter true | Has Setter false |
Name inventory | Type Inventory | Has Getter true | Has Setter false |
Name isCreative | Type boolean | Has Getter true | Has Setter false |
Name isHurt | Type boolean | Has Getter true | Has Setter false |
Name isLocalPlayer | Type boolean | Has Getter true | Has Setter false |
Name isReducedDebugInfo | Type boolean | Has Getter true | Has Setter false |
Name isScoping | Type boolean | Has Getter true | Has Setter false |
Name isSecondaryUseActive | Type boolean | Has Getter true | Has Setter false |
Name isSleepingLongEnough | Type boolean | Has Getter true | Has Setter false |
Name luck | Type float | Has Getter true | Has Setter false |
Name mainArm | Type HumanoidArm | Has Getter true | Has Setter false |
Name mayBuild | Type boolean | Has Getter true | Has Setter false |
Name score | Type int | Has Getter true | Has Setter false |
Name shoulderEntityLeft | Type MapData | Has Getter true | Has Setter false |
Name shoulderEntityRight | Type MapData | Has Getter true | Has Setter false |
Name sleepTimer | Type int | Has Getter true | Has Setter false |
Name xpNeededForNextLevel | Type int | Has Getter true | Has Setter false |