Class FakePlayer
- All Implemented Interfaces:
ComponentsAccess,Attackable,DataTracked,ScoreHolder,Nameable,EntityLike,UniquelyIdentifiable
ServerPlayerEntity that is not a human player.
They are typically used to automatically perform player actions such as placing blocks.
The easiest way to obtain a fake player is with get(ServerWorld) or get(ServerWorld, GameProfile).
It is also possible to create a subclass for more control over the fake player's behavior.
For good inter-mod compatibility, fake players should have the UUID of their owning (human) player.
They should still have a different name to ensure the GameProfile is different.
For example:
UUID humanPlayerUuid = ...;
String humanPlayerName = ...;
GameProfile fakeProfile = new GameProfile(humanPlayerUuid, "[Block Breaker of " + humanPlayerName + "]");
If a fake player does not belong to a specific player, the default UUID should be used.
Fake players try to behave like regular ServerPlayerEntity objects to a reasonable extent.
In some edge cases, or for gameplay considerations, it might be necessary to check whether a ServerPlayerEntity is a fake player.
This can be done with an instanceof check: player instanceof FakePlayer.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.network.ServerPlayerEntity
ServerPlayerEntity.RespawnNested classes/interfaces inherited from class net.minecraft.entity.player.PlayerEntity
PlayerEntity.SleepFailureReasonNested classes/interfaces inherited from class net.minecraft.entity.LivingEntity
LivingEntity.FallSoundsNested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UUIDDefault UUID, for fake players not associated with a specific (human) player.Fields inherited from class net.minecraft.server.network.ServerPlayerEntity
ENDER_PEARLS_DIMENSION_KEY, ENDER_PEARLS_KEY, field_49777, field_54046, field_54047, field_54207, interactionManager, networkHandler, notInAnyWorld, seenCredits, serverFields inherited from class net.minecraft.entity.player.PlayerEntity
abilityResyncCountdown, capeX, capeY, capeZ, currentExplosionImpactPos, currentScreenHandler, damageTiltYaw, DEFAULT_EYE_HEIGHT, DEFAULT_MAIN_ARM, enchantingTableSeed, enderChestInventory, experienceLevel, experiencePickUpDelay, experienceProgress, explodedBy, field_30644, field_30645, field_30646, field_30647, field_30648, field_30649, field_30650, field_46175, field_47819, field_47820, field_49734, field_49735, field_55202, field_7509, fishHook, hungerManager, isSubmergedInWater, lastCapeX, lastCapeY, lastCapeZ, lastStrideDistance, LEFT_SHOULDER_ENTITY, MAIN_ARM, PLAYER_MODEL_PARTS, playerScreenHandler, remainingLoadTicks, RIGHT_SHOULDER_ENTITY, STANDING_DIMENSIONS, strideDistance, totalExperience, VEHICLE_ATTACHMENT_POSFields inherited from class net.minecraft.entity.LivingEntity
activeItemStack, attackingPlayer, ATTRIBUTES_NBT_KEY, BABY_SCALE_FACTOR, bodyYaw, brain, dead, DEATH_TICKS, deathTime, defaultMaxHealth, despawnCounter, elytraFlightController, equipment, EQUIPMENT_SLOT_ID, field_30072, field_30074, field_30075, field_44874, field_47756, field_48827, field_55952, field_56256, forwardSpeed, glidingTicks, GLOWING_FLAG, GRAVITY, handSwinging, handSwingProgress, handSwingTicks, headTrackingIncrements, headYaw, hurtTime, interpolator, itemUseTimeLeft, jumping, lastAttackedTicks, lastBodyYaw, lastDamageTaken, lastHandSwingProgress, lastHeadYaw, limbAnimator, LIVING_FLAGS, maxHurtTime, NOT_WEARING_GAZE_DISGUISE_PREDICATE, OFF_HAND_ACTIVE_FLAG, playerHitTimer, preferredHand, riptideAttackDamage, riptideStack, riptideTicks, serverHeadYaw, sidewaysSpeed, SLEEPING_DIMENSIONS, stuckArrowTimer, stuckStingerTimer, upwardSpeed, USING_ITEM_FLAG, USING_RIPTIDE_FLAGFields inherited from class net.minecraft.entity.Entity
age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, fallDistance, field_44870, field_44871, field_44872, field_49073, field_49791, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLIDING_FLAG_INDEX, GLOWING_FLAG_INDEX, groundCollision, horizontalCollision, ID_KEY, inPowderSnow, intersectionChecked, lastPitch, lastRenderX, lastRenderY, lastRenderZ, lastX, lastY, lastYaw, lastZ, MAX_COMMAND_TAGS, MAX_RIDING_COOLDOWN, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, noClip, ON_FIRE_FLAG_INDEX, PASSENGERS_KEY, portalManager, POSE, random, ridingCooldown, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnowFields inherited from interface net.minecraft.scoreboard.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFakePlayer(ServerWorld world, com.mojang.authlib.GameProfile profile) -
Method Summary
Modifier and TypeMethodDescriptionstatic FakePlayerget(ServerWorld world) Retrieves a fake player for the specified world, using thedefault UUID.static FakePlayerget(ServerWorld world, com.mojang.authlib.GameProfile profile) Retrieves a fake player for the specified world and game profile.@Nullable TeamvoidincreaseStat(Stat<?> stat, int amount) booleanisInvulnerableTo(ServerWorld world, DamageSource damageSource) voidopenEditSignScreen(SignBlockEntity sign, boolean front) openHandledScreen(@Nullable NamedScreenHandlerFactory factory) voidopenHorseInventory(AbstractHorseEntity horse, Inventory inventory) voidvoidsetClientOptions(SyncedClientOptions settings) voidbooleanstartRiding(Entity entity, boolean force) voidtick()Methods inherited from class net.minecraft.server.network.ServerPlayerEntity
addCritParticles, addEnchantedHitParticles, addEnderPearl, addEnderPearlTicket, addExperience, addExperienceLevels, allowsServerListing, applyEnchantmentCosts, applyMovementEffects, areClientChatColorsEnabled, attack, canBeSpectated, canModifyAt, changeGameMode, clearStartRaidPos, closeHandledScreen, consumeItem, copyFrom, createCommonPlayerSpawnInfo, createCooldownManager, damage, detachForDimensionChange, dismountVehicle, dropItem, dropSelectedItem, endCombat, enterCombat, fall, getAdvancementTracker, getCameraEntity, getChunkFilter, getClientChatVisibility, getClientOptions, getCommandOutput, getCommandSource, getDamageAgainst, getEnderPearls, getInputVelocityForMinecart, getIp, getLastActionTime, getMovement, getPermissionLevel, getPlayerInput, getPlayerListName, getPlayerListOrder, getRecipeBook, getRespawn, getRespawnTarget, getSculkShriekerWarningManager, getServerWorld, getSession, getStartRaidPos, getStatHandler, getTextStream, getViewDistance, getWatchedSection, getWorldSpawnPos, giveOrDropStack, handleThrownEnderPearl, increaseTravelMotionStats, isDisconnected, isInTeleportationState, jump, lockRecipes, lookAt, lookAtEntity, markHealthDirty, method_68876, onBlockCollision, onDeath, onDisconnect, onExplodedBy, onHandledScreenClosed, onLanding, onRecipeCrafted, onSpawn, onStatusEffectApplied, onStatusEffectsRemoved, onStatusEffectUpgraded, onTeleportationDone, openCommandBlockScreen, playerTick, playSoundToPlayer, readCustomDataFromNbt, readEnderPearls, readGameModeNbt, readRootVehicle, refreshPositionAfterTeleport, removeEnderPearl, requestTeleport, requestTeleportOffset, rotate, sendAbilitiesUpdate, sendChatMessage, sendEquipmentBreakStatus, sendMessage, sendMessage, sendMessageToClient, sendPickup, sendServerMetadata, sendTradeOffers, setCameraEntity, setChunkFilter, setExperienceLevel, setExperiencePoints, setMovement, setPlayerInput, setServerWorld, setSession, setSpawnExtraParticlesOnFall, setSpawnPoint, setSpawnPointFrom, setStartRaidPos, setWatchedSection, shouldDamagePlayer, shouldFilterMessagesSentTo, shouldFilterText, swingHand, teleport, teleportTo, tickCramming, tickFallStartPos, tickHunger, tickItemStackUsage, tickPortalCooldown, tickRiding, tickVehicleInLavaRiding, tiltScreen, triggerItemPickedUpByEntityCriteria, trySleep, unlockRecipes, unlockRecipes, updateKilledAdvancementCriterion, updateLastActionTime, updatePotionVisibility, useBook, wakeUp, writeCustomDataToNbtMethods inherited from class net.minecraft.entity.player.PlayerEntity
addExhaustion, addScore, addShoulderEntity, adjustMovementForSneaking, animateDamage, applyDamage, attackLivingEntity, canActVoluntarily, canBeHitByProjectile, canChangeIntoPose, canConsume, canDropItems, canFoodHeal, canGlide, canHarvest, canInteractWithBlockAt, canInteractWithEntity, canInteractWithEntityIn, canModifyBlocks, canMoveVoluntarily, canPlaceOn, canResetTimeBySleeping, canSprintAsVehicle, canTakeDamage, checkGliding, clearCurrentExplosion, clipAtLedge, createEquipment, createPlayerAttributes, damageArmor, damageHelmet, doesNotSuffocate, dropCreativeStack, dropInventory, dropItem, dropShoulderEntities, getAbilities, getAbsorptionAmount, getAttackCooldownProgress, getAttackCooldownProgressPerTick, getBaseDimensions, getBlockBreakingSpeed, getBlockInteractionRange, getBurningDuration, getDamageTiltYaw, getDeathSound, getDefaultPortalCooldown, getDisplayName, getEnchantingTableSeed, getEnderChestInventory, getEntityInteractionRange, getExperienceToDrop, getFallSounds, getGameProfile, getHighSpeedSplashSound, getHungerManager, getHurtSound, getInventory, getItemCooldownManager, getLastDeathPos, getLeashPos, getLuck, getMainArm, getMaxRelativeHeadRotation, getMoveEffect, getMovementSpeed, getName, getNameForScoreboard, getNextLevelExperience, getOffGroundSpeed, getPoses, getProjectileType, getScore, getScoreboard, getShoulderEntityLeft, getShoulderEntityRight, getSleepTimer, getSoundCategory, getSplashSound, getStackReference, getSwimSound, getVelocityMultiplier, getWeaponStack, giveItemStack, handleFallDamage, handleStatus, hasPermissionLevel, hasReducedDebugInfo, increaseStat, incrementStat, incrementStat, initDataTracker, interact, isArmorSlot, isBlockBreakingRestricted, isClimbing, isControlledByMainPlayer, isControlledByPlayer, isCreativeLevelTwoOp, isImmobile, isInCreativeMode, isLoaded, isMainPlayer, isPartVisible, isPlayer, isPushedByFluids, isSpectator, isSwimming, isUsingSpyglass, method_68877, method_68878, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPickupSlotClick, onSwimmingStart, openCommandBlockMinecartScreen, openJigsawScreen, openStructureBlockScreen, openTestBlockScreen, openTestInstanceBlockScreen, playSound, playStepSound, remove, requestRespawn, resetLastAttackedTicks, setAbsorptionAmountUnclamped, setFireTicks, setIgnoreFallDamageFromCurrentExplosion, setLastDeathPos, setLoaded, setMainArm, setReducedDebugInfo, setScore, setShoulderEntityLeft, setShoulderEntityRight, shouldAlwaysDropExperience, shouldCancelInteraction, shouldCloseHandledScreenOnRespawn, shouldDismount, shouldIgnoreFallDamageFromCurrentExplosion, shouldRenderName, shouldRotateWithMinecart, shouldSave, shouldSkipBlockDrops, shouldSwimInFluids, slowMovement, spawnSweepAttackParticles, startGliding, takeShieldHit, tickLoaded, tickMovement, travel, tryClearCurrentExplosion, updatePose, updateSwimming, updateWaterSubmersionState, useRiptide, vanishCursedItems, wakeUpMethods inherited from class net.minecraft.entity.LivingEntity
addDeathParticles, addPowderSnowSlowIfNeeded, addStatusEffect, addStatusEffect, applyArmorToDamage, applyFluidMovingSpeed, areItemsDifferent, baseTick, becomeAngry, canBreatheInWater, canDispenserEquipSlot, canEquip, canEquipFromDispenser, canFreeze, canGlideWith, canHaveStatusEffect, canHit, canPickUpLoot, canSee, canSee, canTarget, canTarget, canUsePortals, canUseSlot, canWalkOnFluid, clampScale, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, computeFallDamage, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, damageEquipment, deserializeBrain, disableExperienceDropping, drop, dropEquipment, dropExperience, dropLoot, equipStack, forEachGeneratedItem, forEachGiftedItem, forEachShearedItem, getActiveHand, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttackingPlayer, getAttackKnockbackAgainst, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getBaseWaterMovementSpeedMultiplier, getBlockingItem, getBodyYaw, getBoundingBox, getBrain, getClimbingPos, getControlledMovementInput, getDamageBlockedAmount, getDamageTracker, getDespawnCounter, getDimensions, getEffectFadeFactor, getEffectiveGravity, getEquippedStack, getEquipSound, getExperienceToDrop, getGlidingTicks, getGravity, getHandSwingProgress, getHeadYaw, getHealth, getHitbox, getInterpolator, getItemUseTime, getItemUseTimeLeft, getJumpBoostVelocityModifier, getJumpVelocity, getJumpVelocity, getLastAttackedTime, getLastAttacker, getLastAttackTime, getLeaningPitch, getLocationBasedEnchantmentEffects, getLootTableSeed, getMainHandStack, getMaxAbsorption, getMaxHealth, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPassengerRidingPos, getPlayerHitTimer, getPreferredEquipmentSlot, getPrimeAdversary, getRecentDamageSource, getSaddledSpeed, getSafeFallDistance, getSafeFallDistance, getScale, getScaleFactor, getSleepingDirection, getSleepingPosition, getSlotForHand, getSoundPitch, getSoundVolume, getStackInArm, getStackInHand, getStatusEffect, getStatusEffects, getStepHeight, getStingerCount, getStuckArrowCount, getWeaponDisableBlockingForSeconds, getYaw, hasInvertedHealingAndHarm, hasLandedInFluid, hasNoDrag, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isBaby, isBlocking, isDead, isEntityLookingAtMe, isExperienceDroppingDisabled, isGliding, isGlowing, isHolding, isHolding, isHoldingOntoLadder, isInsideWall, isInSwimmingPose, isMobOrPlayer, isPartOfGame, isPushable, isSleeping, isUsingItem, isUsingRiptide, kill, knockback, knockDownwards, lerpHeadYaw, lerpYaw, markEffectsDirty, modifyAppliedDamage, onAttacking, onDamaged, onEquipStack, onKilledBy, onRemoval, onSpawnPacket, onTrackedDataSet, playBlockFallSound, playHurtSound, playSound, positionInPortal, positionInPortal, pushAway, pushAwayFrom, removePowderSnowSlow, removeStatusEffect, removeStatusEffectInternal, sendEffectToControllingPlayer, setAbsorptionAmount, setAttacker, setAttacking, setAttacking, setAttackingPlayer, setBodyYaw, setCurrentHand, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setMovementSpeed, setNearbySongPlaying, setNoDrag, setOnFireForTicks, setSleepingPosition, setSprinting, setStackInHand, setStatusEffect, setStingerCount, setStuckArrowCount, shouldDropExperience, shouldDropLoot, spawnItemParticles, stopGliding, stopRiding, stopUsingItem, swimUpward, swingHand, takeKnockback, teleport, tickControlled, tickGliding, tickHandSwing, tickInVoid, tickMovementInput, tickNewAi, tickRiptide, tickStatusEffects, tryAttack, turnHead, updateAttribute, updateLimbs, updateLimbs, updatePostDeath, updateTrackedHeadRotation, wouldNotSuffocateInPoseMethods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addPortalChunkTicketAt, addVelocity, addVelocity, addVelocityInternal, adjustMovementForCollisions, adjustMovementForPiston, applyBubbleColumnEffects, applyBubbleColumnSurfaceEffects, applyGravity, applyMirror, applyRotation, attemptTickInVoid, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateDefaultBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canExplosionDestroyBlock, canStartRiding, canTeleportBetween, castComponentValue, changeLookDirection, checkDespawn, clientDamage, collidesWith, collidesWithStateAtPos, copyComponentFrom, copyComponentsFrom, copyComponentsFrom, copyFrom, copyPositionAndRotation, couldAcceptPassenger, createSpawnPacket, defrost, detach, discard, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, equals, extinguish, extinguishWithSound, get, getAir, getAttachments, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyX, getBodyY, getBodyZ, getBoundingBox, getBrightnessAtEyes, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingPassenger, getControllingVehicle, getCustomName, getDamageSources, getDataTracker, getDefaultName, getEffectiveExplosionResistance, getEntityWorld, getEyeHeight, getEyePos, getEyeY, getFacing, getFinalGravity, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandPosOffset, getHeight, getHorizontalFacing, getHoverEvent, getId, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLastRenderPos, getLeashOffset, getLeashOffset, getLerpedPitch, getLerpedPos, getLerpedYaw, getLootTableKey, getMaxAir, getMinFreezeDamageTicks, getMovementDirection, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerAttachmentPos, getPassengerAttachmentPos, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPos, getPose, getPosWithYOffset, getProjectileDeflection, getRandom, getRandomBodyY, getRegistryManager, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSavedEntityId, getServer, getStandingEyeHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSyncedPos, getTargetingMargin, getTeamColorValue, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVehicleAttachmentPos, getVelocity, getVelocityAffectingPos, getWidth, getWorld, getX, getY, getYaw, getZ, handleAttack, handleFall, handleFallDamageForPassengers, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPlayerRider, hasPortalCooldown, hasVehicle, igniteByLava, interact, interactAt, isAlwaysInvulnerableTo, isAttackable, isCollidable, isConnectedThroughVehicle, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFlappingWings, isFrozen, isGlowingLocal, isImmuneToExplosion, isInFluid, isInLava, isInPose, isInRange, isInRange, isInSameTeam, isInSneakingPose, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isOnRail, isPartOf, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSprinting, isSubmergedIn, isSubmergedInWater, isSupportedBy, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, lerpPosAndRotation, limitFallDistance, move, movementInputToVelocity, occludeVibrationSignals, onDataTrackerUpdate, onPassengerLookAround, onPlayerCollision, onRemove, onRemoved, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSoundIfNotSilent, playSwimSound, playSwimSound, popQueuedCollisionCheck, populateCrashReport, pushOutOfBlocks, raycast, readNbt, recalculateDimensions, refreshPosition, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, refreshPositionAndAngles, reinitDimensions, removeAllPassengers, removeCommandTag, removeFromDimension, removePassenger, requestTeleportAndDismount, resetPortalCooldown, resetPosition, saveNbt, saveSelfNbt, scheduleVelocityUpdate, serverDamage, setAir, setAngles, setApplicableComponent, setBoundingBox, setChangeListener, setComponent, setCustomName, setCustomNameVisible, setFlag, setFrozenTicks, setGlowing, setId, setInPowderSnow, setInvisible, setInvulnerable, setLastPositionAndAngles, setMovement, setMovement, setNoGravity, setOnFire, setOnFireFor, setOnFireFromLava, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldControlVehicles, shouldDismountUnderwater, shouldEscapePowderSnow, shouldPlayBurnSoundInLava, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTickBlockCollision, sidedDamage, spawnBubbleColumnParticles, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, streamPassengersAndSelf, streamSelfAndPassengers, tickBlockCollision, tickBlockCollision, tickPortalTeleportation, toString, tryUsePortal, unsetRemoved, updateEventHandler, updateLastAngles, updateLastPosition, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSupportingBlockPos, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, writeNbtMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.component.ComponentsAccess
getOrDefault, getTypedMethods inherited from interface net.minecraft.scoreboard.ScoreHolder
getStyledDisplayName
-
Field Details
-
DEFAULT_UUID
Default UUID, for fake players not associated with a specific (human) player.
-
-
Constructor Details
-
FakePlayer
-
-
Method Details
-
get
Retrieves a fake player for the specified world, using thedefault UUID. This is suitable when the fake player is not associated with a specific (human) player. Otherwise, the UUID of the owning (human) player should be used (see class javadoc).Instances are reused for the same world parameter.
Caution should be exerted when storing the returned value, as strong references to the fake player will keep the world loaded.
-
get
Retrieves a fake player for the specified world and game profile. See class javadoc for more information on fake player game profiles.Instances are reused for the same parameters.
Caution should be exerted when storing the returned value, as strong references to the fake player will keep the world loaded.
-
tick
public void tick()- Overrides:
tickin classServerPlayerEntity
-
setClientOptions
- Overrides:
setClientOptionsin classServerPlayerEntity
-
increaseStat
- Overrides:
increaseStatin classServerPlayerEntity
-
resetStat
- Overrides:
resetStatin classServerPlayerEntity
-
isInvulnerableTo
- Overrides:
isInvulnerableToin classServerPlayerEntity
-
getScoreboardTeam
- Overrides:
getScoreboardTeamin classEntity
-
sleep
- Overrides:
sleepin classServerPlayerEntity
-
startRiding
- Overrides:
startRidingin classServerPlayerEntity
-
openEditSignScreen
- Overrides:
openEditSignScreenin classServerPlayerEntity
-
openHandledScreen
- Overrides:
openHandledScreenin classServerPlayerEntity
-
openHorseInventory
- Overrides:
openHorseInventoryin classServerPlayerEntity
-