Uses of Class
net.minecraft.server.network.ServerPlayerEntity
Package
Description
The basic AI system for Minecraft living entities.
-
Uses of ServerPlayerEntity in net.minecraft.advancement
Modifier and TypeMethodDescriptionvoid
AdvancementRewards.apply
(ServerPlayerEntity player) AdvancementFrame.getChatAnnouncementText
(AdvancementEntry advancementEntry, ServerPlayerEntity player) void
PlayerAdvancementTracker.sendUpdate
(ServerPlayerEntity player) void
PlayerAdvancementTracker.setOwner
(ServerPlayerEntity owner) ModifierConstructorDescriptionPlayerAdvancementTracker
(com.mojang.datafixers.DataFixer dataFixer, PlayerManager playerManager, ServerAdvancementLoader advancementLoader, Path filePath, ServerPlayerEntity owner) -
Uses of ServerPlayerEntity in net.minecraft.advancement.criterion
Modifier and TypeMethodDescriptionboolean
EffectsChangedCriterion.Conditions.matches
(ServerPlayerEntity player, @Nullable LootContext context) boolean
EntityHurtPlayerCriterion.Conditions.matches
(ServerPlayerEntity player, DamageSource damageSource, float dealt, float taken, boolean blocked) boolean
LevitationCriterion.Conditions.matches
(ServerPlayerEntity player, Vec3d distance, int duration) boolean
PlayerHurtEntityCriterion.Conditions.matches
(ServerPlayerEntity player, LootContext entity, DamageSource damageSource, float dealt, float taken, boolean blocked) boolean
OnKilledCriterion.Conditions.test
(ServerPlayerEntity player, LootContext entity, DamageSource killingBlow) boolean
ThrownItemPickedUpByEntityCriterion.Conditions.test
(ServerPlayerEntity player, ItemStack stack, LootContext entity) protected void
AbstractCriterion.trigger
(ServerPlayerEntity player, Predicate<T> predicate) void
AnyBlockUseCriterion.trigger
(ServerPlayerEntity player, BlockPos pos, ItemStack stack) void
BeeNestDestroyedCriterion.trigger
(ServerPlayerEntity player, BlockState state, ItemStack stack, int beeCount) void
BredAnimalsCriterion.trigger
(ServerPlayerEntity player, AnimalEntity parent, AnimalEntity partner, @Nullable PassiveEntity child) void
BrewedPotionCriterion.trigger
(ServerPlayerEntity player, RegistryEntry<Potion> potion) void
ChangedDimensionCriterion.trigger
(ServerPlayerEntity player, RegistryKey<World> from, RegistryKey<World> to) void
ChanneledLightningCriterion.trigger
(ServerPlayerEntity player, Collection<? extends Entity> victims) void
ConstructBeaconCriterion.trigger
(ServerPlayerEntity player, int level) void
ConsumeItemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
CuredZombieVillagerCriterion.trigger
(ServerPlayerEntity player, ZombieEntity zombie, VillagerEntity villager) void
DefaultBlockUseCriterion.trigger
(ServerPlayerEntity player, BlockPos pos) void
EffectsChangedCriterion.trigger
(ServerPlayerEntity player, @Nullable Entity source) void
EnchantedItemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, int levels) void
EnterBlockCriterion.trigger
(ServerPlayerEntity player, BlockState state) void
EntityHurtPlayerCriterion.trigger
(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) void
FallAfterExplosionCriterion.trigger
(ServerPlayerEntity player, Vec3d startPosition, @Nullable Entity cause) void
FilledBucketCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
FishingRodHookedCriterion.trigger
(ServerPlayerEntity player, ItemStack rod, FishingBobberEntity bobber, Collection<ItemStack> fishingLoots) void
InventoryChangedCriterion.trigger
(ServerPlayerEntity player, PlayerInventory inventory, ItemStack stack) private void
InventoryChangedCriterion.trigger
(ServerPlayerEntity player, PlayerInventory inventory, ItemStack stack, int full, int empty, int occupied) void
ItemCriterion.trigger
(ServerPlayerEntity player, BlockPos pos, ItemStack stack) void
ItemDurabilityChangedCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, int durability) void
KilledByArrowCriterion.trigger
(ServerPlayerEntity player, Collection<Entity> piercingKilledEntities, @Nullable ItemStack weapon) void
LevitationCriterion.trigger
(ServerPlayerEntity player, Vec3d startPos, int duration) void
LightningStrikeCriterion.trigger
(ServerPlayerEntity player, LightningEntity lightning, List<Entity> bystanders) void
OnKilledCriterion.trigger
(ServerPlayerEntity player, Entity entity, DamageSource killingDamage) void
PlayerGeneratesContainerLootCriterion.trigger
(ServerPlayerEntity player, RegistryKey<LootTable> lootTable) void
PlayerHurtEntityCriterion.trigger
(ServerPlayerEntity player, Entity entity, DamageSource damage, float dealt, float taken, boolean blocked) void
PlayerInteractedWithEntityCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, Entity entity) void
RecipeCraftedCriterion.trigger
(ServerPlayerEntity player, RegistryKey<Recipe<?>> recipeKey, List<ItemStack> ingredients) void
RecipeUnlockedCriterion.trigger
(ServerPlayerEntity player, RecipeEntry<?> recipe) void
ShotCrossbowCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
SlideDownBlockCriterion.trigger
(ServerPlayerEntity player, BlockState state) void
StartedRidingCriterion.trigger
(ServerPlayerEntity player) void
SummonedEntityCriterion.trigger
(ServerPlayerEntity player, Entity entity) void
TameAnimalCriterion.trigger
(ServerPlayerEntity player, AnimalEntity entity) void
TargetHitCriterion.trigger
(ServerPlayerEntity player, Entity projectile, Vec3d hitPos, int signalStrength) void
ThrownItemPickedUpByEntityCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, @Nullable Entity entity) void
TickCriterion.trigger
(ServerPlayerEntity player) void
TravelCriterion.trigger
(ServerPlayerEntity player, Vec3d startPos) void
UsedEnderEyeCriterion.trigger
(ServerPlayerEntity player, BlockPos strongholdPos) void
UsedTotemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
UsingItemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
VillagerTradeCriterion.trigger
(ServerPlayerEntity player, MerchantEntity merchant, ItemStack stack) -
Uses of ServerPlayerEntity in net.minecraft.block.entity
Modifier and TypeMethodDescriptionstatic @Nullable ServerPlayerEntity
SculkShriekerBlockEntity.findResponsiblePlayerFromEntity
(@Nullable Entity entity) Modifier and TypeMethodDescriptionprivate static List
<ServerPlayerEntity> SculkShriekerWarningManager.getPlayersInRange
(ServerWorld world, BlockPos pos) Modifier and TypeMethodDescriptionvoid
AbstractFurnaceBlockEntity.dropExperienceForRecipesUsed
(ServerPlayerEntity player) void
SculkShriekerBlockEntity.shriek
(ServerWorld world, @Nullable ServerPlayerEntity player) private boolean
SculkShriekerBlockEntity.trySyncWarningLevel
(ServerWorld world, ServerPlayerEntity player) static OptionalInt
SculkShriekerWarningManager.warnNearbyPlayers
(ServerWorld world, BlockPos pos, ServerPlayerEntity player) -
Uses of ServerPlayerEntity in net.minecraft.command
-
Uses of ServerPlayerEntity in net.minecraft.command.argument
Modifier and TypeMethodDescriptionstatic ServerPlayerEntity
EntityArgumentType.getPlayer
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) Modifier and TypeMethodDescriptionstatic Collection
<ServerPlayerEntity> EntityArgumentType.getOptionalPlayers
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) static Collection
<ServerPlayerEntity> EntityArgumentType.getPlayers
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) -
Uses of ServerPlayerEntity in net.minecraft.entity
Modifier and TypeMethodDescriptionboolean
Entity.canBeSpectated
(ServerPlayerEntity spectator) Returns whetherspectator
can spectate this entity.void
Entity.onStartedTrackingBy
(ServerPlayerEntity player) Called whenplayer
starts tracking this entity.void
Entity.onStoppedTrackingBy
(ServerPlayerEntity player) Called whenplayer
stops tracking this entity.private int
ExperienceOrbEntity.repairPlayerGears
(ServerPlayerEntity player, int amount) Repairs a player's gears using the experience recursively, until the experience is all used or all gears are repaired.void
LightningEntity.setChanneler
(@Nullable ServerPlayerEntity channeler) -
Uses of ServerPlayerEntity in net.minecraft.entity.ai.brain.task
Modifier and TypeMethodDescriptionprivate void
GiveInventoryToLookTargetTask.triggerCriterion
(LookTarget target, ItemStack stack, ServerPlayerEntity player) -
Uses of ServerPlayerEntity in net.minecraft.entity.ai.goal
-
Uses of ServerPlayerEntity in net.minecraft.entity.boss
Modifier and TypeFieldDescriptionprivate final Set
<ServerPlayerEntity> ServerBossBar.players
private final Set
<ServerPlayerEntity> ServerBossBar.unmodifiablePlayers
Modifier and TypeMethodDescriptionvoid
CommandBossBar.addPlayer
(ServerPlayerEntity player) void
ServerBossBar.addPlayer
(ServerPlayerEntity player) void
BossBarManager.onPlayerConnect
(ServerPlayerEntity player) void
CommandBossBar.onPlayerConnect
(ServerPlayerEntity player) void
BossBarManager.onPlayerDisconnect
(ServerPlayerEntity player) void
CommandBossBar.onPlayerDisconnect
(ServerPlayerEntity player) void
WitherEntity.onStartedTrackingBy
(ServerPlayerEntity player) Called whenplayer
starts tracking this entity.void
WitherEntity.onStoppedTrackingBy
(ServerPlayerEntity player) Called whenplayer
stops tracking this entity.void
CommandBossBar.removePlayer
(ServerPlayerEntity player) void
ServerBossBar.removePlayer
(ServerPlayerEntity player) Modifier and TypeMethodDescriptionboolean
CommandBossBar.addPlayers
(Collection<ServerPlayerEntity> players) -
Uses of ServerPlayerEntity in net.minecraft.entity.effect
Modifier and TypeMethodDescriptionstatic List
<ServerPlayerEntity> StatusEffectUtil.addEffectToPlayersWithinDistance
(ServerWorld world, @Nullable Entity entity, Vec3d origin, double range, StatusEffectInstance statusEffectInstance, int duration) -
Uses of ServerPlayerEntity in net.minecraft.entity.passive
Modifier and TypeMethodDescriptionstatic Optional
<ServerPlayerEntity> AllayBrain.getLikedPlayer
(LivingEntity allay) Modifier and TypeMethodDescriptionboolean
TameableShoulderEntity.mountOnto
(ServerPlayerEntity player) -
Uses of ServerPlayerEntity in net.minecraft.entity.player
-
Uses of ServerPlayerEntity in net.minecraft.item
Modifier and TypeMethodDescriptionprivate int
ItemStack.calculateDamage
(int baseDamage, ServerWorld world, @Nullable ServerPlayerEntity player) void
ItemStack.damage
(int amount, ServerWorld world, @Nullable ServerPlayerEntity player, Consumer<Item> breakCallback) Damages this item stack.private Vec3d
MaceItem.getCurrentExplosionImpactPos
(ServerPlayerEntity player) private void
ItemStack.onDurabilityChange
(int damage, @Nullable ServerPlayerEntity player, Consumer<Item> breakCallback) -
Uses of ServerPlayerEntity in net.minecraft.network.message
Modifier and TypeMethodDescriptionMessageDecorator.decorate
(@Nullable ServerPlayerEntity sender, Text message) void
SentMessage.Chat.send
(ServerPlayerEntity sender, boolean filterMaskEnabled, MessageType.Parameters params) void
SentMessage.Profileless.send
(ServerPlayerEntity sender, boolean filterMaskEnabled, MessageType.Parameters params) void
SentMessage.send
(ServerPlayerEntity sender, boolean filterMaskEnabled, MessageType.Parameters params) -
Uses of ServerPlayerEntity in net.minecraft.network.packet.s2c.play
Modifier and TypeMethodDescriptionstatic PlayerListS2CPacket
PlayerListS2CPacket.entryFromPlayer
(Collection<ServerPlayerEntity> players) ModifierConstructorDescription(package private)
Entry
(ServerPlayerEntity player) PlayerListS2CPacket
(PlayerListS2CPacket.Action action, ServerPlayerEntity player) ModifierConstructorDescriptionPlayerListS2CPacket
(EnumSet<PlayerListS2CPacket.Action> actions, Collection<ServerPlayerEntity> players) -
Uses of ServerPlayerEntity in net.minecraft.predicate
Modifier and TypeMethodDescriptionboolean
DamagePredicate.test
(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) -
Uses of ServerPlayerEntity in net.minecraft.predicate.entity
Modifier and TypeMethodDescriptionstatic LootContext
EntityPredicate.createAdvancementEntityLootContext
(ServerPlayerEntity player, Entity target) boolean
DamageSourcePredicate.test
(ServerPlayerEntity player, DamageSource damageSource) boolean
EntityPredicate.test
(ServerPlayerEntity player, @Nullable Entity entity) -
Uses of ServerPlayerEntity in net.minecraft.recipe
Modifier and TypeMethodDescriptiondefault boolean
RecipeUnlocker.shouldCraftRecipe
(ServerPlayerEntity player, RecipeEntry<?> recipe) -
Uses of ServerPlayerEntity in net.minecraft.server
Modifier and TypeFieldDescriptionprivate final ServerPlayerEntity
SampleSubscriptionTracker.PlayerSubscriptionData.player
The field for theplayer
record component.Modifier and TypeFieldDescriptionprivate final Map
<UUID, ServerPlayerEntity> PlayerManager.playerMap
private final List
<ServerPlayerEntity> PlayerManager.players
private final EnumMap
<DebugSampleType, Map<ServerPlayerEntity, SampleSubscriptionTracker.MeasureTimeTick>> SampleSubscriptionTracker.subscriptionMap
Modifier and TypeMethodDescriptionPlayerManager.createPlayer
(com.mojang.authlib.GameProfile profile, SyncedClientOptions syncedOptions) SampleSubscriptionTracker.PlayerSubscriptionData.player()
Returns the value of theplayer
record component.PlayerManager.respawnPlayer
(ServerPlayerEntity player, boolean alive, Entity.RemovalReason removalReason) Modifier and TypeMethodDescriptionPlayerManager.getPlayerList()
Gets a list of all players on a Minecraft server.PlayerManager.getPlayersByIp
(String ip) Modifier and TypeMethodDescriptionvoid
SampleSubscriptionTracker.addPlayer
(ServerPlayerEntity player, DebugSampleType type) private void
PlayerManager.broadcast
(SignedMessage message, Predicate<ServerPlayerEntity> shouldSendFiltered, @Nullable ServerPlayerEntity sender, MessageType.Parameters params) Broadcasts a chat message to all players and the server console.void
PlayerManager.broadcast
(SignedMessage message, ServerPlayerEntity sender, MessageType.Parameters params) Broadcasts a chat message to all players and the server console.MinecraftServer.createFilterer
(ServerPlayerEntity player) PlayerManager.getAdvancementTracker
(ServerPlayerEntity player) MinecraftServer.getPlayerInteractionManager
(ServerPlayerEntity player) PlayerManager.loadPlayerData
(ServerPlayerEntity player) void
PlayerManager.onPlayerConnect
(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData) void
PlayerManager.remove
(ServerPlayerEntity player) PlayerManager.respawnPlayer
(ServerPlayerEntity player, boolean alive, Entity.RemovalReason removalReason) protected void
PlayerManager.savePlayerData
(ServerPlayerEntity player) void
PlayerManager.sendCommandTree
(ServerPlayerEntity player) private void
PlayerManager.sendCommandTree
(ServerPlayerEntity player, int permissionLevel) private void
MinecraftServer.sendDifficulty
(ServerPlayerEntity player) void
ServerTickManager.sendPackets
(ServerPlayerEntity player) void
PlayerManager.sendPlayerStatus
(ServerPlayerEntity player) protected void
PlayerManager.sendScoreboard
(ServerScoreboard scoreboard, ServerPlayerEntity player) void
PlayerManager.sendStatusEffects
(ServerPlayerEntity player) void
PlayerManager.sendWorldInfo
(ServerPlayerEntity player, ServerWorld world) void
MinecraftServer.subscribeToDebugSample
(ServerPlayerEntity player, DebugSampleType type) Modifier and TypeMethodDescriptionprivate void
PlayerManager.broadcast
(SignedMessage message, Predicate<ServerPlayerEntity> shouldSendFiltered, @Nullable ServerPlayerEntity sender, MessageType.Parameters params) Broadcasts a chat message to all players and the server console.void
PlayerManager.broadcast
(Text message, Function<ServerPlayerEntity, Text> playerMessageFactory, boolean overlay) Broadcasts a message to all players and the server console.ModifierConstructorDescription(package private)
PlayerSubscriptionData
(ServerPlayerEntity serverPlayerEntity, DebugSampleType debugSampleType) -
Uses of ServerPlayerEntity in net.minecraft.server.command
Modifier and TypeFieldDescriptionfinal BiConsumer
<ServerPlayerEntity, Integer> ExperienceCommand.Component.adder
(package private) final ToIntFunction
<ServerPlayerEntity> ExperienceCommand.Component.getter
final BiPredicate
<ServerPlayerEntity, Integer> ExperienceCommand.Component.setter
Modifier and TypeMethodDescriptionServerCommandSource.getPlayer()
Returns the player from this command source, ornull
if the source is not a player.ServerCommandSource.getPlayerOrThrow()
Returns the player from this command source.Modifier and TypeMethodDescriptionprivate static Collection
<ServerPlayerEntity> PlaySoundCommand.toList
(@Nullable ServerPlayerEntity player) Modifier and TypeMethodDescriptionprivate static int
SpectateCommand.execute
(ServerCommandSource source, @Nullable Entity entity, ServerPlayerEntity player) private static int
TriggerCommand.executeAdd
(ServerCommandSource source, ServerPlayerEntity player, ScoreboardObjective objective, int amount) private static int
DebugConfigCommand.executeConfig
(ServerCommandSource source, ServerPlayerEntity player) private static int
ExperienceCommand.executeQuery
(ServerCommandSource source, ServerPlayerEntity player, ExperienceCommand.Component component) private static int
TriggerCommand.executeSet
(ServerCommandSource source, ServerPlayerEntity player, ScoreboardObjective objective, int value) private static int
TriggerCommand.executeSimple
(ServerCommandSource source, ServerPlayerEntity player, ScoreboardObjective objective) RaidCommand.getRaid
(ServerPlayerEntity player) int
AdvancementCommand.Operation.processAll
(ServerPlayerEntity player, Iterable<AdvancementEntry> advancements) protected abstract boolean
AdvancementCommand.Operation.processEach
(ServerPlayerEntity player, AdvancementEntry advancement) protected abstract boolean
AdvancementCommand.Operation.processEachCriterion
(ServerPlayerEntity player, AdvancementEntry advancement, String criterion) void
CommandManager.sendCommandTree
(ServerPlayerEntity player) private static void
GameModeCommand.sendFeedback
(ServerCommandSource source, ServerPlayerEntity player, GameMode gameMode) boolean
ServerCommandSource.shouldFilterText
(ServerPlayerEntity recipient) Returns whether to filter text sent torecipient
.private static Collection
<ServerPlayerEntity> PlaySoundCommand.toList
(@Nullable ServerPlayerEntity player) Modifier and TypeMethodDescriptionprivate static int
ClearCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Predicate<ItemStack> item) private static int
ClearCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Predicate<ItemStack> item, int maxCount) private static int
GameModeCommand.execute
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Collection<ServerPlayerEntity> targets, GameMode gameMode) private static int
GiveCommand.execute
(ServerCommandSource source, ItemStackArgument item, Collection<ServerPlayerEntity> targets, int count) private static int
KickCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Text reason) private static int
ListCommand.execute
(ServerCommandSource source, Function<ServerPlayerEntity, Text> nameProvider) private static void
MessageCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, SignedMessage message) private static int
ParticleCommand.execute
(ServerCommandSource source, ParticleEffect parameters, Vec3d pos, Vec3d delta, float speed, int count, boolean force, Collection<ServerPlayerEntity> viewers) private static int
PlaySoundCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Identifier sound, SoundCategory category, Vec3d pos, float volume, float pitch, float minVolume) private static int
SpawnPointCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, BlockPos pos, float angle) private static int
StopSoundCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, @Nullable SoundCategory category, @Nullable Identifier sound) private static void
TeamMsgCommand.execute
(ServerCommandSource source, Entity entity, Team team, List<ServerPlayerEntity> recipients, SignedMessage message) private static int
ExperienceCommand.executeAdd
(ServerCommandSource source, Collection<? extends ServerPlayerEntity> targets, int amount, ExperienceCommand.Component component) private static int
AdvancementCommand.executeAdvancement
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, AdvancementCommand.Operation operation, Collection<AdvancementEntry> selection) private static int
TitleCommand.executeClear
(ServerCommandSource source, Collection<ServerPlayerEntity> targets) private static int
AdvancementCommand.executeCriterion
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, AdvancementCommand.Operation operation, AdvancementEntry advancement, String criterion) private static int
LootCommand.executeGive
(Collection<ServerPlayerEntity> players, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender) private static int
RecipeCommand.executeGive
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Collection<RecipeEntry<?>> recipes) private static int
TitleCommand.executeReset
(ServerCommandSource source, Collection<ServerPlayerEntity> targets) private static int
ExperienceCommand.executeSet
(ServerCommandSource source, Collection<? extends ServerPlayerEntity> targets, int amount, ExperienceCommand.Component component) private static int
RecipeCommand.executeTake
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Collection<RecipeEntry<?>> recipes) private static int
TitleCommand.executeTimes
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, int fadeIn, int stay, int fadeOut) private static int
TitleCommand.executeTitle
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Text title, String titleType, Function<Text, Packet<?>> constructor) private static int
BossBarCommand.setPlayers
(ServerCommandSource source, CommandBossBar bossBar, Collection<ServerPlayerEntity> players) ModifierConstructorDescriptionprivate
Component
(String name, BiConsumer<ServerPlayerEntity, Integer> adder, BiPredicate<ServerPlayerEntity, Integer> setter, ToIntFunction<ServerPlayerEntity> getter) private
Component
(String name, BiConsumer<ServerPlayerEntity, Integer> adder, BiPredicate<ServerPlayerEntity, Integer> setter, ToIntFunction<ServerPlayerEntity> getter) private
Component
(String name, BiConsumer<ServerPlayerEntity, Integer> adder, BiPredicate<ServerPlayerEntity, Integer> setter, ToIntFunction<ServerPlayerEntity> getter) -
Uses of ServerPlayerEntity in net.minecraft.server.dedicated
Modifier and TypeMethodDescriptionMinecraftDedicatedServer.createFilterer
(ServerPlayerEntity player) void
MinecraftDedicatedServer.subscribeToDebugSample
(ServerPlayerEntity player, DebugSampleType type) -
Uses of ServerPlayerEntity in net.minecraft.server.dedicated.command
Modifier and TypeMethodDescriptionprivate static int
TransferCommand.executeTransfer
(ServerCommandSource source, String host, int port, Collection<ServerPlayerEntity> players) -
Uses of ServerPlayerEntity in net.minecraft.server.integrated
Modifier and TypeMethodDescriptionprotected void
IntegratedPlayerManager.savePlayerData
(ServerPlayerEntity player) -
Uses of ServerPlayerEntity in net.minecraft.server.network
Modifier and TypeFieldDescriptionprivate final ServerPlayerEntity
ServerItemCooldownManager.player
protected final ServerPlayerEntity
ServerPlayerInteractionManager.player
ServerPlayNetworkHandler.player
Modifier and TypeMethodDescriptionPlayerAssociatedNetworkHandler.getPlayer()
ServerPlayNetworkHandler.getPlayer()
ServerPlayerEntity.teleportTo
(TeleportTarget teleportTarget) Modifier and TypeMethodDescriptionboolean
ServerPlayerEntity.canBeSpectated
(ServerPlayerEntity spectator) Returns whetherspectator
can spectate this entity.private static boolean
ServerPlayNetworkHandler.canPlace
(ServerPlayerEntity player, ItemStack stack) Checks if a player can place a block or fluid from a bucket.void
ServerPlayerEntity.copyFrom
(ServerPlayerEntity oldPlayer, boolean alive) DemoServerPlayerInteractionManager.interactBlock
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand, BlockHitResult hitResult) ServerPlayerInteractionManager.interactBlock
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand, BlockHitResult hitResult) DemoServerPlayerInteractionManager.interactItem
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand) ServerPlayerInteractionManager.interactItem
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand) int
ServerRecipeBook.lockRecipes
(Collection<RecipeEntry<?>> recipes, ServerPlayerEntity player) ServerPlayNetworkHandler.Interaction.run
(ServerPlayerEntity player, Entity entity, Hand hand) void
ChunkDataSender.sendChunkBatches
(ServerPlayerEntity player) void
ServerRecipeBook.sendInitRecipesPacket
(ServerPlayerEntity player) void
EntityTrackerEntry.sendPackets
(ServerPlayerEntity player, Consumer<Packet<ClientPlayPacketListener>> sender) void
ServerPlayerEntity.setSpawnPointFrom
(ServerPlayerEntity player) boolean
ServerPlayerEntity.shouldFilterMessagesSentTo
(ServerPlayerEntity player) void
EntityTrackerEntry.startTracking
(ServerPlayerEntity player) void
EntityTrackerEntry.stopTracking
(ServerPlayerEntity player) void
ChunkDataSender.unload
(ServerPlayerEntity player, ChunkPos pos) int
ServerRecipeBook.unlockRecipes
(Collection<RecipeEntry<?>> recipes, ServerPlayerEntity player) ModifierConstructorDescriptionServerPlayNetworkHandler
(MinecraftServer server, ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData) -
Uses of ServerPlayerEntity in net.minecraft.server.world
Modifier and TypeFieldDescription(package private) final List
<ServerPlayerEntity> ServerWorld.players
(package private) final Long2ObjectMap
<ObjectSet<ServerPlayerEntity>> ChunkTicketManager.playersByChunkPos
private final Object2BooleanMap
<ServerPlayerEntity> PlayerChunkWatchingManager.watchingPlayers
Modifier and TypeMethodDescriptionServerWorld.getRandomAlivePlayer()
Returns a randomly selected alive player, ornull
if there is none.Modifier and TypeMethodDescriptionServerWorld.getPlayers()
ServerWorld.getPlayers
(Predicate<? super ServerPlayerEntity> predicate) Returns the list of players filtered usingpredicate
.ServerWorld.getPlayers
(Predicate<? super ServerPlayerEntity> predicate, int limit) Returns the list of players filtered usingpredicate
, up tolimit
.ChunkHolder.PlayersWatchingChunkProvider.getPlayersWatchingChunk
(ChunkPos chunkPos, boolean onlyOnWatchDistanceEdge) PlayerChunkWatchingManager.getPlayersWatchingChunk()
ServerChunkLoadingManager.getPlayersWatchingChunk
(ChunkPos pos) ServerChunkLoadingManager.getPlayersWatchingChunk
(ChunkPos chunkPos, boolean onlyOnWatchDistanceEdge) Modifier and TypeMethodDescriptionvoid
PlayerChunkWatchingManager.add
(ServerPlayerEntity player, boolean inactive) private void
ServerWorld.addPlayer
(ServerPlayerEntity player) private boolean
ServerChunkLoadingManager.canTickChunk
(ServerPlayerEntity player, ChunkPos pos) Returns whether theplayer
can tick the chunk atpos
.void
PlayerChunkWatchingManager.disableWatch
(ServerPlayerEntity player) private boolean
ServerChunkLoadingManager.doesNotGenerateChunks
(ServerPlayerEntity player) void
PlayerChunkWatchingManager.enableWatch
(ServerPlayerEntity player) (package private) int
ServerChunkLoadingManager.getViewDistance
(ServerPlayerEntity player) void
ChunkTicketManager.handleChunkEnter
(ChunkSectionPos pos, ServerPlayerEntity player) void
ChunkTicketManager.handleChunkLeave
(ChunkSectionPos pos, ServerPlayerEntity player) (package private) void
ServerChunkLoadingManager.handlePlayerAddedOrRemoved
(ServerPlayerEntity player, boolean added) private boolean
ServerChunkLoadingManager.isOnTrackEdge
(ServerPlayerEntity player, int chunkX, int chunkZ) (package private) boolean
ServerChunkLoadingManager.isTracked
(ServerPlayerEntity player, int chunkX, int chunkZ) boolean
PlayerChunkWatchingManager.isWatchDisabled
(ServerPlayerEntity player) boolean
PlayerChunkWatchingManager.isWatchInactive
(ServerPlayerEntity player) void
ServerWorld.onPlayerConnected
(ServerPlayerEntity player) Called on the player's world when the player connected to the server and spawned.void
ServerWorld.onPlayerRespawned
(ServerPlayerEntity player) Called on the world that has the player's respawn point when the player respawned.void
PlayerChunkWatchingManager.remove
(ServerPlayerEntity player) void
ServerWorld.removePlayer
(ServerPlayerEntity player, Entity.RemovalReason reason) private boolean
ServerWorld.sendToPlayerIfNearby
(ServerPlayerEntity player, boolean force, double x, double y, double z, Packet<?> packet) Sends thepacket
toplayer
if the player is near the provided coordinates.private void
ServerChunkLoadingManager.sendWatchPackets
(ServerPlayerEntity player) private void
ServerChunkLoadingManager.sendWatchPackets
(ServerPlayerEntity player, ChunkFilter chunkFilter) <T extends ParticleEffect>
booleanServerWorld.spawnParticles
(ServerPlayerEntity viewer, T particle, boolean force, double x, double y, double z, int count, double deltaX, double deltaY, double deltaZ, double speed) Spawns a particle visible toviewer
, if the viewer is near the provided coordinates.void
ServerChunkLoadingManager.EntityTracker.stopTracking
(ServerPlayerEntity player) private void
ServerChunkLoadingManager.track
(ServerPlayerEntity player, ChunkPos pos) private static void
ServerChunkLoadingManager.track
(ServerPlayerEntity player, WorldChunk chunk) private static void
ServerChunkLoadingManager.untrack
(ServerPlayerEntity player, ChunkPos pos) void
ServerChunkLoadingManager.updatePosition
(ServerPlayerEntity player) Updates the chunk section position of theplayer
.void
ServerChunkManager.updatePosition
(ServerPlayerEntity player) Updates the chunk section position of theplayer
.void
ServerChunkLoadingManager.EntityTracker.updateTrackedStatus
(ServerPlayerEntity player) Updates the tracked status of this tracker's entity for theplayer
.private void
ServerChunkLoadingManager.updateWatchedSection
(ServerPlayerEntity player) Updates the watched chunk section position for theplayer
, and sends a render distance update packet to the client.Modifier and TypeMethodDescriptionboolean
SleepManager.canResetTime
(int percentage, List<ServerPlayerEntity> players) Returns if the night can actually be skipped at the tick this is called.ServerWorld.getPlayers
(Predicate<? super ServerPlayerEntity> predicate) Returns the list of players filtered usingpredicate
.ServerWorld.getPlayers
(Predicate<? super ServerPlayerEntity> predicate, int limit) Returns the list of players filtered usingpredicate
, up tolimit
.private void
ChunkHolder.sendBlockEntityUpdatePacket
(List<ServerPlayerEntity> players, World world, BlockPos pos) private void
ChunkHolder.sendPacketToPlayers
(List<ServerPlayerEntity> players, Packet<?> packet) private void
ChunkHolder.tryUpdateBlockEntityAt
(List<ServerPlayerEntity> players, World world, BlockPos pos, BlockState state) boolean
SleepManager.update
(List<ServerPlayerEntity> players) Updates the sleeping player and total player counts.void
ServerChunkLoadingManager.EntityTracker.updateTrackedStatus
(List<ServerPlayerEntity> players) Updates the tracked status of this tracker's entity for the given players. -
Uses of ServerPlayerEntity in net.minecraft.stat
-
Uses of ServerPlayerEntity in net.minecraft.test
Modifier and TypeMethodDescriptionTestContext.createMockCreativeServerPlayerInWorld()
Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ServerPlayerEntity in net.minecraft.village.raid
Modifier and TypeMethodDescriptionboolean
Raid.start
(ServerPlayerEntity player) RaidManager.startRaid
(ServerPlayerEntity player, BlockPos pos) -
Uses of ServerPlayerEntity in net.minecraft.world
Modifier and TypeFieldDescriptionprivate final Long2ObjectMap
<List<ServerPlayerEntity>> SpawnDensityCapper.chunkPosToMobSpawnablePlayers
private final Map
<ServerPlayerEntity, SpawnDensityCapper.DensityCap> SpawnDensityCapper.playersToDensityCap
Modifier and TypeMethodDescriptionprivate List
<ServerPlayerEntity> SpawnDensityCapper.getMobSpawnablePlayers
(ChunkPos chunkPos)