Options
All
  • Public
  • Public/Protected
  • All
Menu

Wrapper for the native Player class extending Mob and giving access to methods associated specifically with the player entity.

For convenience, it duplicates all the methods from InnerCore's PlayerActor, and of course adds bunch of new ones.

You can construct new Player from an existing Actor or Mob, or call Actor.asPlayer.

First will throw java.lang.IllegalArgumentException, second will return null, if given Actor or Mob is not a Player.

since

2.0

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

class: Class<Object>

Methods

  • addExperience(exp: number): void
  • addItemToInventory(id: number, count: number, data: number, extra?: NativeItemInstanceExtra, dropRemaining?: boolean): void
  • addLevels(levels: number): void
  • since

    2.0

    Parameters

    • levels: number

    Returns void

  • addRider(rider: Actor): void
  • applyFinalFriction(friction: number, discardFriction: boolean): void
  • attack(victim: Actor): void
  • breaksFallingBlocks(): boolean
  • calcMoveRelativeSpeed(travelType: number): number
  • calculateAttackDamage(victim: number | Actor): number
  • calculateAttackDamage(id: number, count: number, data: number, extra?: NativeItemInstanceExtra, victim?: number | Actor): number
  • calculateJumpImpulse(): number
  • canAttack(victim: Actor, someBool: boolean): boolean
  • canBeAffected(effectId: number): boolean
  • canBeAffected(effect: MobEffectInstance): boolean
  • canBeControlledByRider(): boolean
  • canBePulledIntoVehicle(): boolean
  • canBeSeenOnMap(): boolean
  • canBeginOrContinueClimbingLadder(): boolean
  • canBreatheAir(): boolean
  • canBreatheLava(): boolean
  • canBreatheSolids(): boolean
  • canBreatheWater(): boolean
  • canChangeDimensions(): boolean
  • canClimb(): boolean
  • canCurrentlySwim(): boolean
  • canExistInPeaceful(): boolean
  • canExistWhenDisallowMob(): boolean
  • canFly(): boolean
  • canMakeStepSound(): boolean
  • canMate(mate: Actor): boolean
  • canPowerJump(): boolean
  • canSee(actor: Actor): boolean
  • canSee(x: number, y: number, z: number): boolean
  • canSeeInvisible(): boolean
  • canShowNameTag(): boolean
  • canStartSleepInBed(): boolean
  • canUseOperatorBlocks(): boolean
  • causeFoodExhaustion(exhaustion: number): void
  • since

    2.0

    Parameters

    • exhaustion: number

    Returns void

  • chorusFruitTeleport(x: number, y: number, z: number): void
  • clone(): any
  • consumeTotem(): void
  • distanceTo(actor: Actor): number
  • distanceTo(x: number, y: number, z: number): number
  • doFireHurt(amount: number): void
  • doWaterSplashEffect(): void
  • dropTowards(x: number, y: number, z: number, id: number, count: number, data: number, extra?: NativeItemInstanceExtra): void
  • eat(nutrition: number, saturation: number): void
  • since

    2.0

    Parameters

    • nutrition: number
    • saturation: number

    Returns void

  • eat2(nutrition: number, saturationModifier: number): void
  • since

    2.0

    Parameters

    • nutrition: number
    • saturationModifier: number

    Returns void

  • equals(param0: any): boolean
  • feed(amount: number): void
  • finalize(): void
  • forceAllowEating(): boolean
  • generatesBubbles(): boolean
  • getActiveEffectCount(): number
  • getAirRegenPerTick(): number
  • getAirSupply(): number
  • getAlwaysShowNameTag(): boolean
  • getArmorCoverPercentage(): number
  • getArmorMaterialTextureTypeInSlot(slot: number): number
  • getArmorMaterialTypeInSlot(slot: number): number
  • getArmorValue(): number
  • getAttackDamage(): number
  • getCameraDistance(): number
  • getCaravanHead(): Mob
  • getCaravanSize(): number
  • getChainedDamageEffects(): boolean
  • getChestSlots(): number
  • getCollidableMobNear(): boolean
  • getColor(): number
  • getColor2(): number
  • getCommandPermissionLevel(): number
  • getControllingSeat(): number
  • getCurrentSwingDuration(): number
  • getDamageNearbyMobs(): boolean
  • getDimensionId(): number
  • getEatCounter(): number
  • getEnchantmentSeed(): number
  • getEquipSlots(): number
  • getEquipmentCount(): number
  • getExhaustion(): number
  • getExpLevel(): number
  • getExperience(): number
  • getFirstCaravanHead(): Mob
  • getFlightSpeed(): number
  • getFrictionModifier(): number
  • getGameMode(): number
  • getGlidingTicks(): number
  • getHasSeenCredits(): boolean
  • getHealth(): number
  • getHunger(): number
  • getHurtDir(): number
  • getInhaleTime(): number
  • getInterpolatedBodyYaw(partialTicks: number): number
  • getInterpolatedWalkAnimSpeed(partialTicks: number): number
  • getInventorySize(): number
  • getIsOnScreen(): boolean
  • getItemUseDuration(): number
  • getItemUseIntervalProgress(): number
  • getItemUseStartupProgress(): number
  • getJumpDuration(): number
  • getJumpMultiplier(): number
  • getJumpPower(): number
  • getLastHurtByMob(): Mob
  • getLevelProgress(): number
  • getLifeSpan(): number
  • getLuck(): number
  • getMapIndex(): number
  • getMarkVariant(): number
  • getMaxAirSupply(): number
  • getMaxHeadXRot(): number
  • getMaxHealth(): number
  • getMeleeKnockbackBonus(): number
  • getMeleeWeaponDamageBonus(mob: Mob): number
  • getMovementComponentCurrentSpeed(): number
  • getNewEnchantmentSeed(): number
  • getNoActionTime(): number
  • getOnDeathExperience(): number
  • getOutputSignal(): number
  • getPickRadius(): number
  • getPlayerPermissionLevel(): number
  • getPointer(): number
  • Returns number

    pointer to the native object wrapped by the following Actor object, represented by a signed 64-bit integer

  • getPortalCooldown(): number
  • getPortalWaitTime(): number
  • getPreviousTickSleepTimer(): number
  • getRadius(): number
  • getRiderLockedBodyRot(): number
  • getRiderRotLimit(): number
  • getRiderYRotation(rider: Actor): number
  • getRidingHeight(): number
  • getRollCounter(): number
  • getSaturation(): number
  • getScore(): number
  • getSelectedSlot(): number
  • getShadowRadius(): number
  • getShakeTime(): number
  • getSkinID(): number
  • getSleepTimer(): number
  • getSpawnMethod(): number
  • getSpeed(): number
  • getSpeedInMetersPerSecond(): number
  • getStatusFlag(flag: number): boolean
  • getStrength(): number
  • getStrengthMax(): number
  • getStructuralIntegrity(): number
  • getSuffocateTime(): number
  • getTempted(): boolean
  • getTicksUsingItem(): number
  • getTotalAirSupply(): number
  • getTravelType(): number
  • getUnderwaterLightLevel(): number
  • getUniqueID(): number
  • getVariant(): number
  • getVerticalSpeedInMetersPerSecond(): number
  • getXpNeededForLevelRange(min: number, max: number): number
  • since

    2.0

    Parameters

    • min: number
    • max: number

    Returns number

  • getXpNeededForNextLevel(): number
  • getXxa(): number
  • getYRotA(): number
  • getYawSpeedInDegreesPerSecond(): number
  • getYya(): number
  • getZza(): number
  • hasAnyEffects(): boolean
  • hasAnyVisibleEffects(): boolean
  • hasAttributeBuff(buffType: number): boolean
  • hasBeenHurtByMobInLastTicks(ticks: number): boolean
  • hasBoundOrigin(): boolean
  • hasCaravanTail(): boolean
  • hasCategory(category: number): boolean
  • hasDimension(): boolean
  • hasEffect(effect: MobEffect): boolean
  • hasEffect(effectId: number): boolean
  • hasEnteredWater(): boolean
  • hasFishingHook(): boolean
  • hasHurt(): boolean
  • hasLevel(): boolean
  • hasOpenContainer(): boolean
  • hasOutputSignal(signal: number): boolean
  • hasPlayerRider(): boolean
  • hasPriorityAmmunition(): boolean
  • hasRider(): boolean
  • hasRuntimeID(): boolean
  • hasTeleported(): boolean
  • hasTickingArea(): boolean
  • hasTotemEquipped(): boolean
  • hasType(type: number): boolean
  • hasUniqueID(): boolean
  • hashCode(): number
  • heal(amount: number): void
  • healEffects(value: number): void
  • inCaravan(): boolean
  • inDownwardFlowingLiquid(): boolean
  • incrementArrowCount(increment: number): void
  • intersects(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): boolean
  • since

    1.0

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number

    Returns boolean

  • isAdventure(): boolean
  • isAlive(): boolean
  • isAlliedTo(mob: Mob): boolean
  • isAngry(): boolean
  • isAutoJumpEnabled(): boolean
  • isAutonomous(): boolean
  • isBaby(): boolean
  • isBlocking(): boolean
  • isBouncing(): boolean
  • isBreakingObstruction(): boolean
  • isBribed(): boolean
  • isCharged(): boolean
  • isChatAllowed(): boolean
  • isChested(): boolean
  • isClientSide(): boolean
  • isClimbing(): boolean
  • isControlledByLocalInstance(): boolean
  • isCreative(): boolean
  • isCreativeModeAllowed(): boolean
  • isDancing(): boolean
  • isDelayedAttacking(): boolean
  • isDoorBreaker(): boolean
  • isDoorOpener(): boolean
  • isEating(): boolean
  • isElytraFlying(): boolean
  • isEmoting(): boolean
  • isEnchanted(): boolean
  • isFireImmune(): boolean
  • isFishable(): boolean
  • isForcedRespawn(): boolean
  • isFree(x: number, y: number, z: number): boolean
  • isFree(x: number, y: number, z: number, someFloat: number): boolean
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns boolean

  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number
    • someFloat: number

    Returns boolean

  • isFrostWalking(): boolean
  • isGliding(): boolean
  • isHeadInWater(): boolean
  • isHostingPlayer(): boolean
  • isHungry(): boolean
  • isIgnited(): boolean
  • isImmersedInWater(): boolean
  • isImmobile(): boolean
  • isInClouds(): boolean
  • isInLava(): boolean
  • isInLove(): boolean
  • isInPrecipitation(): boolean
  • isInRaid(): boolean
  • isInRain(): boolean
  • isInScaffolding(): boolean
  • isInSnow(): boolean
  • isInThunderstorm(): boolean
  • isInWall(): boolean
  • isInWater(): boolean
  • isInWaterOrRain(): boolean
  • isInWorld(): boolean
  • isInsidePortal(): boolean
  • isInterpolationActive(): boolean
  • isInvertedHealAndHarm(): boolean
  • isInvisible(): boolean
  • isJumping(): boolean
  • isLayingDown(): boolean
  • isLayingEgg(): boolean
  • isLeashableType(): boolean
  • isLeashed(): boolean
  • isLocalPlayer(): boolean
  • isLookingAtAnEntity(): boolean
  • isMob(): boolean
  • isMoving(): boolean
  • isNaturallySpawned(): boolean
  • isOnFire(): boolean
  • isOnGround(): boolean
  • isOnHotBlock(): boolean
  • isOperator(): boolean
  • isOrphan(): boolean
  • isOutOfControl(): boolean
  • isOverScaffolding(): boolean
  • isOverWater(): boolean
  • isPacified(): boolean
  • isPersistent(): boolean
  • isPickable(): boolean
  • isPlayer(): boolean
  • isPowered(): boolean
  • isPredictedMovementEnabled(): boolean
  • isPregnant(): boolean
  • isResting(): boolean
  • isRider(rider: Actor): boolean
  • isRiding(ridden: Actor): boolean
  • isRiding(): boolean
  • isRolling(): boolean
  • isSafeToSleepNear(): boolean
  • isScared(): boolean
  • isSheared(): boolean
  • isShootable(): boolean
  • isSilent(): boolean
  • isSitting(): boolean
  • isSleeping(): boolean
  • isSlime(): boolean
  • isSneaking(): boolean
  • isSprinting(): boolean
  • isStackable(): boolean
  • isStanding(): boolean
  • isSurfaceMob(): boolean
  • isSwimmer(): boolean
  • isSwimming(): boolean
  • isSwinging(): boolean
  • isTame(): boolean
  • isTargetable(): boolean
  • isTrading(): boolean
  • isTransitioningSitting(): boolean
  • isTrusting(): boolean
  • isType(type: number): boolean
  • isUnderLiquid(materialType: number): boolean
  • isUsingItem(): boolean
  • isValidTarget(potentialTarget: Actor): boolean
  • isViewer(): boolean
  • isWASDControlled(): boolean
  • isWalker(): boolean
  • isWorldBuilder(): boolean
  • joinCaravan(caravanHead: Mob): void
  • jumpFromGround(): void
  • kill(): void
  • leaveCaravan(): void
  • lerpMotion(x: number, y: number, z: number): void
  • lerpTo(x: number, y: number, z: number, rotX: number, rotY: number): void
  • since

    1.0

    Parameters

    • x: number
    • y: number
    • z: number
    • rotX: number
    • rotY: number

    Returns void

  • moveRelative(strafe: number, up: number, forward: number, friction: number): void
  • since

    1.0

    Parameters

    • strafe: number
    • up: number
    • forward: number
    • friction: number

    Returns void

  • notify(): void
  • notifyAll(): void
  • onLightningHit(): void
  • openSign(x: number, y: number, z: number): void
  • since

    2.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • outOfWorld(): boolean
  • performRangedAttack(victim: Actor, distanceFactor: number): void
  • pushOutOfBlocks(x: number, y: number, z: number): void
  • removeAllEffects(): void
  • removeAllRiders(b1: boolean, b2: boolean): void
  • removeEffect(id: number): void
  • removeEffectNoUpdate(id: number): void
  • removeEffects(harmful: boolean, harmless: boolean): void
  • removeEntity(): void
  • resetNoActionTime(): void
  • setAABB(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): void
  • since

    1.0

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number

    Returns void

  • setAirSupply(supply: number): void
  • setAutonomous(auto: boolean): void
  • setAuxValue(aux: number): void
  • setBlockTarget(x: number, y: number, z: number): void
  • setBreakingObstruction(breaking: boolean): void
  • setCameraDistance(distance: number): void
  • setCanClimb(canClimb: boolean): void
  • setCanFly(canFly: boolean): void
  • setCanPowerJump(canPowerJump: boolean): void
  • setChainedDamageEffects(chained: boolean): void
  • setCharged(charged: boolean): void
  • setClimbing(climbing: boolean): void
  • setCollidableMob(collidable: boolean): void
  • setCollidableMobNear(collidable: boolean): void
  • setColor(color: number): void
  • setColor2(color: number): void
  • setControllingSeat(seat: number): void
  • setDamageNearbyMobs(damage: boolean): void
  • setDancing(dancing: boolean): void
  • setDelayedAttacking(delayed: boolean): void
  • setDoorBreaker(breaker: boolean): void
  • setDoorOpener(opener: boolean): void
  • setEatCounter(counter: number): void
  • setEating(eating: boolean): void
  • setEnchanted(enchanted: boolean): void
  • setEnchantmentSeed(seed: number): void
  • since

    2.0

    Parameters

    • seed: number

    Returns void

  • setExhaustion(value: number): void
  • setExpLevel(level: number): void
  • since

    2.0

    Parameters

    • level: number

    Returns void

  • setExperience(value: number): void
  • setFieldOfViewModifier(modifier: number): void
  • since

    2.0

    Parameters

    • modifier: number

    Returns void

  • setFlightSpeed(speed: number): void
  • setFrictionModifier(frictionModifier: number): void
  • setGameMode(mode: number): void
  • since

    2.0

    Parameters

    • mode: number

    Returns void

  • setHasSeenCredits(seen: boolean): void
  • since

    2.0

    Parameters

    • seen: boolean

    Returns void

  • setHunger(value: number): void
  • setHurtDir(hurtDir: number): void
  • setInLove(lover: Actor): void
  • setInterpolationActive(interpolationActive: boolean): void
  • setInvisible(invisible: boolean): void
  • setIsLayingEgg(laying: boolean): void
  • setIsOnScreen(onScreen: boolean): void
  • setIsPregnant(pregnant: boolean): void
  • setJumpDuration(dur: number): void
  • setJumpVelRedux(redux: number): void
  • setJumping(jumping: boolean): void
  • setLastHurtByMob(mob: Mob): void
  • setLastHurtMob(actor: Actor): void
  • setLayingDown(laying: boolean): void
  • setLimitedLife(life: number): void
  • setMapIndex(index: number): void
  • since

    2.0

    Parameters

    • index: number

    Returns void

  • setMarkVariant(variant: number): void
  • setMaxAirSupply(supply: number): void
  • setMovementComponentCurrentSpeed(speed: number): void
  • setMoving(moving: boolean): void
  • setNameTagVisible(visible: boolean): void
  • setNaturallySpawned(naturallySpawned: boolean): void
  • setOnFire(fireTicks: number): void
  • setPermissions(level: number): void
  • since

    2.0

    Parameters

    • level: number

    Returns void

  • setPowered(powered: boolean): void
  • setRespawnCoords(x: number, y: number, z: number): void
  • setResting(resting: boolean): void
  • setRiderLockedBodyRot(rot: number): void
  • setRiderRotLimit(lim: number): void
  • setRolling(rolling: boolean): void
  • setSaturation(value: number): void
  • setScared(scared: boolean): void
  • setSelectedSlot(slot: number): void
  • setShakeTime(time: number): void
  • setSitting(sitting: boolean): void
  • setSkinID(id: number): void
  • setSleeping(sleeping: boolean): void
  • setSneaking(sneaking: boolean): void
  • setSpawnMethod(method: number): void
  • setSpeed(speed: number): void
  • setSpeedModifier(speedModifier: number): void
  • setSprinting(sprinting: boolean): void
  • setStanding(standing: boolean): void
  • setStrength(strength: number): void
  • setStrengthMax(strength: number): void
  • setStructuralIntegrity(integrity: number): void
  • setStunned(stunned: boolean): void
  • setSurfaceMob(isSurfaceMob: boolean): void
  • setSwimmer(swimmer: boolean): void
  • setTarget(target: Actor): void
  • setTempted(tempted: boolean): void
  • setTransitioningSitting(transitioningSitting: boolean): void
  • setUnderwaterLightLevel(level: number): void
  • since

    2.0

    Parameters

    • level: number

    Returns void

  • setVariant(variant: number): void
  • setWASDControlled(wasd: boolean): void
  • setWalker(walker: boolean): void
  • setWantsToBeJockey(wantsToBeJockey: boolean): void
  • setXxa(xxa: number): void
  • setYHeadRot(rot: number): void
  • setYRotA(yrota: number): void
  • setYya(yya: number): void
  • setZza(yya: number): void
  • shouldApplyWaterGravity(): boolean
  • shouldShowCredits(): boolean
  • shouldTryMakeStepSound(): boolean
  • snapToYBodyRot(rot: number): void
  • snapToYHeadRot(rot: number): void
  • spawnExpOrbs(x: number, y: number, z: number, value: number): void
  • Copy of PlayerActor.spawnExpOrbs. Spawns experience orbs on coords.

    since

    2.0

    Parameters

    • x: number
    • y: number
    • z: number
    • value: number

      experience points value

    Returns void

  • spawnTrailBubbles(): void
  • startCooldown(id: number): void
  • since

    2.0

    Parameters

    • id: number

    Returns void

  • startGliding(): void
  • startRiding(ridden: Actor): void
  • startSleepInBed(x: number, y: number, z: number): void
  • since

    2.0

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • startSpinAttack(): void
  • stopGliding(): void
  • stopSleepInBed(b1: boolean, b2: boolean): void
  • since

    2.0

    Parameters

    • b1: boolean
    • b2: boolean

    Returns void

  • stopSpinAttack(): void
  • swing(): void
  • toString(): string
  • travel(strafe: number, vertical: number, forward: number): void
  • since

    1.0

    Parameters

    • strafe: number
    • vertical: number
    • forward: number

    Returns void

  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void
  • wantsToBeJockey(): boolean
  • wasLastHitByPlayer(): boolean
  • wobble(): void
  • isValid(entityUID: number): boolean
  • since

    1.0

    Parameters

    • entityUID: number

    Returns boolean

    whether the entity with given unique ID currently exists in the world. Use it when you construct Actor and its subclasses, otherwise you will get a java.lang.IllegalArgumentException telling you there is no entity with given id.

Generated using TypeDoc