Package be.seeseemelk.mockbukkit.entity
Class PlayerMock
- All Implemented Interfaces:
MessageTarget,SoundReceiver,NetworkClient,Frictional,PersistentDataViewHolder,net.kyori.adventure.audience.Audience,net.kyori.adventure.bossbar.BossBarViewer,net.kyori.adventure.identity.Identified,net.kyori.adventure.pointer.Pointered,net.kyori.adventure.sound.Sound.Emitter,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>,Attributable,CommandSender,ConfigurationSerializable,Conversable,AnimalTamer,Damageable,Entity,HumanEntity,LivingEntity,Player,InventoryHolder,Metadatable,Nameable,OfflinePlayer,Permissible,ServerOperator,PersistentDataHolder,PluginMessageRecipient,ProjectileSource
Mock implementation of a
Player.- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.SpigotNested classes/interfaces inherited from interface org.bukkit.entity.Player
Player.Spigot -
Field Summary
Fields inherited from class be.seeseemelk.mockbukkit.entity.HumanEntityMock
blocking, expLevelFields inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
alive, attributes, healthFields inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
entityData, perms, server -
Constructor Summary
ConstructorsConstructorDescriptionPlayerMock(@NotNull ServerMock server, @NotNull String name) Constructs a newPlayerMockfor the provided server with the specified name.PlayerMock(@NotNull ServerMock server, @NotNull String name, @NotNull UUID uuid) Constructs a newPlayerMockfor the provided server with the specified name andUUID. -
Method Summary
Modifier and TypeMethodDescriptionvoidabandonConversation(@NotNull Conversation conversation) voidabandonConversation(@NotNull Conversation conversation, @NotNull ConversationAbandonedEvent details) voidacceptConversationInput(@NotNull String input) @UnmodifiableView @NotNull Iterable<? extends net.kyori.adventure.bossbar.BossBar> voidaddAdditionalChatCompletions(@NotNull Collection<String> completions) voidaddCustomChatCompletions(@NotNull Collection<String> completions) voidaddHeardSound(@NotNull AudioExperience audioExperience) Adds a heard sound.voidaddResourcePack(@NotNull UUID id, @NotNull String url, @org.jetbrains.annotations.Nullable byte[] hash, @Nullable String prompt, boolean force) intapplyMending(int amount) voidassertInventoryView(String message, InventoryType type) This method is an assertion for the currently openInventoryViewfor thisPlayer.voidassertInventoryView(String message, InventoryType type, @NotNull Predicate<Inventory> predicate) This method is an assertion for the currently openInventoryViewfor thisPlayer.voidThis method is an assertion for the currently openInventoryViewfor thisPlayer.voidassertInventoryView(InventoryType type, @NotNull Predicate<Inventory> predicate) This method is an assertion for the currently openInventoryViewfor thisPlayer.voidassertItemConsumed(@NotNull ItemStack consumable) Asserts a Player has consumed the given Itemvoid<E extends BanEntry<? super PlayerProfile>>
E<E extends BanEntry<? super PlayerProfile>>
Eban(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer) <E extends BanEntry<? super PlayerProfile>>
E<E extends BanEntry<? super PlayerProfile>>
Eban(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer) @Nullable BanEntry<PlayerProfile> @Nullable BanEntry<PlayerProfile> @Nullable BanEntry<InetAddress> banIp(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer) @Nullable BanEntry<InetAddress> banIp(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer) @Nullable BanEntry<InetAddress> booleanbeginConversation(@NotNull Conversation conversation) @Nullable FireworkboostElytra(@NotNull ItemStack firework) booleanbreakBlock(@NotNull Block block) voidbroadcastSlotBreak(@NotNull EquipmentSlot slot) voidbroadcastSlotBreak(@NotNull EquipmentSlot slot, @NotNull Collection<Player> players) @org.jetbrains.annotations.Range(from=0L, to=2147483647L) intbooleanbooleanbooleancanUseEquipmentSlot(@NotNull EquipmentSlot slot) voidvoidvoiddamageItemStack(@NotNull EquipmentSlot slot, int amount) @NotNull ItemStackdamageItemStack(@NotNull ItemStack stack, int amount) voiddecrementStatistic(@NotNull Statistic statistic) voiddecrementStatistic(@NotNull Statistic statistic, int amount) voiddecrementStatistic(@NotNull Statistic statistic, @NotNull Material material) voiddecrementStatistic(@NotNull Statistic statistic, @NotNull Material material, int amount) voiddecrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) voiddecrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int amount) booleanSimulates a disconnection from the server.@NotNull net.kyori.adventure.text.ComponentvoiddisplayName(@Nullable net.kyori.adventure.text.Component displayName) @NotNull EquipmentSlotintint@Nullable InetSocketAddress@NotNull AdvancementProgressgetAdvancementProgress(@NotNull Advancement advancement) booleanboolean@Nullable Location@UnmodifiableView @NotNull Set<net.kyori.adventure.bossbar.BossBar> Gets an unmodifiable set of all active boss bars currently shown to this player.@Nullable String<T> TgetClientOption(@NotNull ClientOption<T> option) int@NotNull LocationfloatfloatgetCooledAttackStrength(float adjustTicks) @NotNull StringDeprecated.protected EntityStateGet the current state of this entityfloatgetExp()intintlongfloat@Nullable InetSocketAddressdouble@NotNull List<AudioExperience> This returns aListof everyAudioExperiencethis receiver has received.@NotNull DurationlonglongDeprecated.longintgetLevel()@NotNull StringintintDeprecated.intgetPing()@NotNull StringDeprecated.@NotNull PlayerProfilelonglong@Nullable GameModeint@Nullable StringDeprecated, for removal: This API element is subject to removal in a future version.@Nullable PlayerResourcePackStatusEvent.Status@Nullable Location@NotNull Scoreboard@NotNull StringGets the scoreboard entry for this entity.intintintgetStatistic(@NotNull Statistic statistic) intgetStatistic(@NotNull Statistic statistic, @NotNull Material material) intgetStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) int@NotNull EntityTypegetType()int@Nullable InetSocketAddressfloatintintint@Nullable WorldBordervoidgiveExp(int amount) voidgiveExp(int amount, boolean applyMending) voidgiveExpLevels(int amount) boolean@NotNull net.kyori.adventure.util.TriStatebooleanbooleanbooleanvoidhideBossBar(@NotNull net.kyori.adventure.bossbar.BossBar bar) voidhideEntity(@NotNull Plugin plugin, @NotNull Entity entity) voidhidePlayer(@NotNull Player player) Deprecated.voidhidePlayer(@NotNull Plugin plugin, @NotNull Player player) voidDeprecated.voidvoidincrementStatistic(@NotNull Statistic statistic) voidincrementStatistic(@NotNull Statistic statistic, int amount) voidincrementStatistic(@NotNull Statistic statistic, @NotNull Material material) voidincrementStatistic(@NotNull Statistic statistic, @NotNull Material material, int amount) voidincrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) voidincrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int amount) booleanbooleanisBanned()booleanisChunkSent(long chunkKey) booleanbooleanbooleanisFlying()booleanbooleanbooleanisOnline()booleanisOp()booleanbooleanbooleanbooleanbooleanvoidkick()voidkick(@Nullable net.kyori.adventure.text.Component message) voidkick(@Nullable net.kyori.adventure.text.Component message, @NotNull PlayerKickEvent.Cause cause) voidkickPlayer(String message) Deprecated.booleanlistPlayer(@NotNull Player other) voidloadData()@NotNull Localelocale()voidlookAt(double x, double y, double z, @NotNull LookAnchor playerAnchor) voidlookAt(@NotNull Entity entity, @NotNull LookAnchor playerAnchor, @NotNull LookAnchor entityAnchor) @Nullable net.kyori.adventure.text.ComponentReturns the next message that was sent to the target.@Nullable String@Nullable StringvoidvoidbooleanperformCommand(@NotNull String command) voidplayEffect(@NotNull Location loc, @NotNull Effect effect, int data) Deprecated.<T> voidplayEffect(@NotNull Location loc, @NotNull Effect effect, T data) @Nullable net.kyori.adventure.text.Component@Nullable net.kyori.adventure.text.Component@NotNull net.kyori.adventure.text.ComponentvoidplayerListName(@Nullable net.kyori.adventure.text.Component name) voidDeprecated.voidplayNote(@NotNull Location loc, @NotNull Instrument instrument, @NotNull Note note) voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound) voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z) voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull net.kyori.adventure.sound.Sound.Emitter emitter) voidvoidplaySound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) voidplaySound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) voidvoidplaySound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) voidplaySound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) voidvoidplaySound(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) voidplaySound(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) voidvoidplaySound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) voidplaySound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) booleanSimulates a connection to the server.voidremove()voidremoveAdditionalChatCompletions(@NotNull Collection<String> completions) voidremoveCustomChatCompletions(@NotNull Collection<String> completions) voidremoveResourcePack(@NotNull UUID id) voidvoidvoidvoidvoidvoidvoidrespawn()This method simulates thePlayerrespawning and also calls aPlayerRespawnEvent.@NotNull CompletableFuture<byte[]> retrieveCookie(@NotNull NamespacedKey key) voidsaveData()voidsendActionBar(char alternateChar, @NotNull String message) Deprecated.voidsendActionBar(@NotNull String message) Deprecated.voidsendActionBar(@NotNull net.md_5.bungee.api.chat.BaseComponent... message) Deprecated.voidsendBlockChange(@NotNull Location loc, @NotNull Material material, byte data) Deprecated.voidsendBlockChange(@NotNull Location loc, @NotNull BlockData block) voidsendBlockChanges(@NotNull Collection<BlockState> blocks) voidsendBlockChanges(@NotNull Collection<BlockState> blocks, boolean suppressLightUpdates) voidsendBlockDamage(@NotNull Location loc, float progress) voidsendBlockDamage(@NotNull Location loc, float progress, int destroyerIdentity) voidsendBlockDamage(@NotNull Location loc, float progress, @NotNull Entity source) voidsendBlockUpdate(@NotNull Location loc, @NotNull TileState tileState) voidsendEntityEffect(@NotNull EntityEffect entityEffect, @NotNull Entity entity) voidsendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> equipmentChanges) voidsendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item) voidsendExperienceChange(float progress) voidsendExperienceChange(float progress, int level) voidvoidsendHealthUpdate(double health, int foodLevel, float saturationLevel) voidsendHurtAnimation(float yaw) voidsendLinks(@NotNull ServerLinks links) voidvoidsendMessage(String message) voidsendMessage(String... messages) voidsendMessage(UUID sender, String message) voidsendMessage(UUID sender, String... messages) voidsendMessage(@NotNull net.kyori.adventure.identity.Identity source, @NotNull net.kyori.adventure.text.Component message, @NotNull net.kyori.adventure.audience.MessageType type) Deprecated, for removal: This API element is subject to removal in a future version.voidsendMultiBlockChange(@NotNull Map<? extends Position, BlockData> blockChanges) voidsendMultiBlockChange(@NotNull Map<? extends Position, BlockData> blockChanges, boolean suppressLightUpdates) voidsendOpLevel(byte level) voidsendPluginMessage(@NotNull Plugin source, @NotNull String channel, byte[] message) voidsendPotionEffectChange(@NotNull LivingEntity entity, @NotNull PotionEffect effect) voidsendPotionEffectChangeRemove(@NotNull LivingEntity entity, @NotNull PotionEffectType type) voidsendRawMessage(@NotNull String message) voidsendRawMessage(@Nullable UUID sender, @NotNull String message) voidsendSignChange(@NotNull Location loc, @Nullable String @Nullable [] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) voidsendSignChange(@NotNull Location loc, String[] lines) Deprecated.voidsendSignChange(@NotNull Location loc, String[] lines, @NotNull DyeColor dyeColor) voidsendSignChange(@NotNull Location loc, @Nullable List<? extends net.kyori.adventure.text.Component> lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) voidDeprecated.voidDeprecated.voidDeprecated.voidsetActiveItemRemainingTime(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int ticks) voidsetAddress(@Nullable InetSocketAddress address) Sets theInetSocketAddressreturned bygetAddress().voidsetAffectsSpawning(boolean affects) voidsetAllowFlight(boolean flight) voidsetBedSpawnLocation(@Nullable Location loc) voidsetBedSpawnLocation(@Nullable Location loc, boolean override) voidsetCompassTarget(@NotNull Location loc) voidsetCustomChatCompletions(@NotNull Collection<String> completions) voidsetDisplayName(@NotNull String name) Deprecated.voidsetExp(float exp) voidsetExpCooldown(int ticks) voidsetExperienceLevelAndProgress(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int totalExperience) voidsetFlying(boolean value) voidsetFlyingFallDamage(@NotNull net.kyori.adventure.util.TriState flyingFallDamage) voidsetFlySpeed(float value) voidsetGameMode(@NotNull GameMode mode) voidsetHasSeenWinScreen(boolean hasSeenWinScreen) voidsetHealth(double health) voidsetHealthScale(double scale) voidsetHealthScaled(boolean scale) voidsetLastPlayed(long time) Deprecated, for removal: This API element is subject to removal in a future version.voidsetLevel(int level) voidSets player localevoidsetNoDamageTicks(int ticks) voidsetNoTickViewDistance(int viewDistance) Deprecated.voidsetOp(boolean isOperator) voidsetPlayerListFooter(@Nullable String footer) voidsetPlayerListHeader(@Nullable String header) voidsetPlayerListHeaderFooter(@Nullable String header, @Nullable String footer) voidsetPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent header, @Nullable net.md_5.bungee.api.chat.BaseComponent footer) Deprecated.voidsetPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent @NotNull [] header, net.md_5.bungee.api.chat.BaseComponent @NotNull [] footer) Deprecated.voidsetPlayerListName(@Nullable String name) Deprecated.voidsetPlayerProfile(@NotNull PlayerProfile profile) voidsetPlayerTime(long time, boolean relative) voidsetPlayerWeather(@NotNull WeatherType type) voidsetResourcePack(@NotNull String url) Deprecated.voidsetResourcePack(@NotNull String url, @org.jetbrains.annotations.Nullable byte[] hash, @Nullable String prompt) Deprecated.voidsetResourcePack(@NotNull String url, @org.jetbrains.annotations.Nullable byte[] hash, @Nullable String prompt, boolean force) Deprecated.voidsetResourcePack(@NotNull String url, byte[] hash) voidsetResourcePack(@NotNull String url, byte[] hash, boolean force) voidsetResourcePack(@NotNull String url, byte @Nullable [] hash, @Nullable net.kyori.adventure.text.Component prompt, boolean force) voidsetResourcePack(@NotNull String url, @NotNull String hash) voidsetResourcePack(@NotNull String url, @NotNull String hash, boolean required) voidsetResourcePack(@NotNull String url, @NotNull String hash, boolean required, @Nullable net.kyori.adventure.text.Component resourcePackPrompt) voidsetResourcePack(@NotNull UUID uuid, @NotNull String s, @org.jetbrains.annotations.Nullable byte[] bytes, @Nullable String s1, boolean b) Deprecated.voidsetResourcePack(@NotNull UUID uuid, @NotNull String url, byte @Nullable [] hash, @Nullable net.kyori.adventure.text.Component prompt, boolean force) voidsetResourcePack(@NotNull UUID uuid, @NotNull String url, @NotNull String hash, @Nullable net.kyori.adventure.text.Component resourcePackPrompt, boolean required) voidsetRespawnLocation(@Nullable Location loc) voidsetRespawnLocation(@Nullable Location loc, boolean override) voidsetScoreboard(@NotNull Scoreboard scoreboard) voidsetSendViewDistance(int viewDistance) voidsetSimulationDistance(int simulationDistance) voidsetSleepingIgnored(boolean isSleeping) voidsetSpectatorTarget(Entity entity) voidsetSprinting(boolean sprinting) voidsetStatistic(@NotNull Statistic statistic, int newValue) voidsetStatistic(@NotNull Statistic statistic, @NotNull Material material, int newValue) voidsetStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, int newValue) voidsetSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle) Deprecated.voidsetSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle) Deprecated.voidsetTexturePack(@NotNull String url) Deprecated.voidsetTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks) Deprecated.voidsetTotalExperience(int exp) voidsetViewDistance(int viewDistance) voidsetWalkSpeed(float value) voidsetWardenTimeSinceLastWarning(int time) voidsetWardenWarningCooldown(int cooldown) voidsetWardenWarningLevel(int warningLevel) voidsetWhitelisted(boolean value) voidsetWorldBorder(@Nullable WorldBorder border) voidshowBossBar(@NotNull net.kyori.adventure.bossbar.BossBar bar) voidvoidshowElderGuardian(boolean silent) voidshowEntity(@NotNull Plugin plugin, @NotNull Entity entity) voidshowPlayer(@NotNull Player player) Deprecated.voidshowPlayer(@NotNull Plugin plugin, @NotNull Player player) voidshowTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title) Deprecated.voidshowTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title) Deprecated.voidshowTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title, @Nullable net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) Deprecated.voidshowTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title, @Nullable net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) Deprecated.void@Nullable BlockBreakEventsimulateBlockBreak(@NotNull Block block) Deprecated.@Nullable BlockBreakEventsimulateBlockBreak(@NotNull Block block, BlockFace face) Simulates the player breaking a block.@Nullable BlockDamageEventsimulateBlockDamage(@NotNull Block block) Deprecated.@Nullable BlockDamageEventsimulateBlockDamage(@NotNull Block block, BlockFace face) Simulates the player damaging a block.@Nullable BlockPlaceEventsimulateBlockPlace(@NotNull Material material, @NotNull Location location) Simulates the player placing a block.voidsimulateConsumeItem(@NotNull ItemStack consumable) Simulates a Player consuming an Edible Item.voidsimulateConsumeItem(@NotNull ItemStack consumable, boolean alwaysInflictPotionEffect) Simulates a Player consuming an Edible Item.@NotNull InventoryClickEventsimulateInventoryClick(int slot) Simulates the player clicking an Inventory.@NotNull InventoryClickEventsimulateInventoryClick(@NotNull InventoryView inventoryView, int slot) Simulates the player clicking an Inventory.@NotNull InventoryClickEventsimulateInventoryClick(@NotNull InventoryView inventoryView, @NotNull ClickType clickType, int slot) Simulates the player clicking an Inventory.@NotNull PlayerMoveEventsimulatePlayerMove(@NotNull Location moveLocation) This method moves player instantly with respect to PlayerMoveEvent@NotNull PlayerToggleSneakEventsimulateSneak(boolean sneak) Simulates sneaking.@NotNull PlayerToggleSprintEventsimulateSprint(boolean sprint) Simulates sprinting.@NotNull PlayerToggleFlightEventsimulateToggleFlight(boolean fly) Simulates toggling flight.voidspawnParticle(@NotNull Particle particle, double x, double y, double z, int count) voidspawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) voidspawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> voidspawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> voidspawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) <T> voidspawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) <T> voidspawnParticle(@NotNull Particle particle, double x, double y, double z, int count, T data) voidspawnParticle(@NotNull Particle particle, @NotNull Location location, int count) voidspawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ) voidspawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> voidspawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> voidspawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) <T> voidspawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, T data) <T> voidspawnParticle(@NotNull Particle particle, @NotNull Location location, int count, T data) @NotNull Player.Spigotspigot()voidstartRiptideAttack(int i, float v, @Nullable ItemStack itemStack) voidstartUsingItem(@NotNull EquipmentSlot hand) voidvoidvoidstopSound(@NotNull String sound, @Nullable SoundCategory category) voidvoidstopSound(@NotNull SoundCategory category) voidstopSound(@NotNull Sound sound, @Nullable SoundCategory category) voidstoreCookie(@NotNull NamespacedKey key, @org.jetbrains.annotations.NotNull byte[] value) booleanteleport(@NotNull Location location, PlayerTeleportEvent.TeleportCause cause, TeleportFlag @NotNull ... flags) @NotNull CompletableFuture<Boolean> teleportAsync(@NotNull Location loc, @NotNull PlayerTeleportEvent.TeleportCause cause, @NotNull TeleportFlag @NotNull ... teleportFlags) voidbooleanunlistPlayer(@NotNull Player other) voidvoidvoidupdateTitle(@NotNull Title title) Deprecated.Methods inherited from class be.seeseemelk.mockbukkit.entity.HumanEntityMock
assertGameMode, closeInventory, closeInventory, discoverRecipe, discoverRecipes, dropItem, fireworkBoost, getAttackCooldown, getBedLocation, getCooldown, getDiscoveredRecipes, getEnchantmentSeed, getEnderChest, getExhaustion, getExpToLevel, getFishHook, getFoodLevel, getGameMode, getInventory, getItemInHand, getItemInUse, getItemOnCursor, getLastDeathLocation, getMainHand, getOpenInventory, getPotentialBedLocation, getSaturatedRegenRate, getSaturation, getShoulderEntityLeft, getShoulderEntityRight, getSleepTicks, getStarvationRate, getUnsaturatedRegenRate, hasCooldown, hasDiscoveredRecipe, isBlocking, isDeeplySleeping, isHandRaised, openAnvil, openCartographyTable, openEnchanting, openGrindstone, openInventory, openInventory, openLoom, openMerchant, openMerchant, openSign, openSmithingTable, openStonecutter, openWorkbench, releaseLeftShoulderEntity, releaseRightShoulderEntity, setBlocking, setCooldown, setEnchantmentSeed, setExhaustion, setFoodLevel, setItemInHand, setItemOnCursor, setLastDeathLocation, setSaturatedRegenRate, setSaturation, setShoulderEntityLeft, setShoulderEntityRight, setSleepTicks, setStarvationRate, setUnsaturatedRegenRate, setWindowProperty, sleep, undiscoverRecipe, undiscoverRecipes, wakeupMethods inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
addPotionEffect, addPotionEffect, addPotionEffect, addPotionEffects, addPotionEffects, canBreatheUnderwater, clearActiveItem, clearActivePotionEffects, damage, damage, damage, getAbsorptionAmount, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEyeHeight, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getForwardsMovement, getFrictionState, getHandRaised, getHandRaisedTime, getHealth, getHurtDirection, getHurtSound, getItemInUseTicks, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNextArrowRemoval, getNextBeeStingerRemoval, getNoActionTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSidewaysMovement, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, getUpwardsMovement, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, heal, isClimbing, isCollidable, isDead, isGliding, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, isValid, knockback, launchProjectile, launchProjectile, launchProjectile, playHurtAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, registerAttribute, removePotionEffect, resetMaxHealth, setAbsorptionAmount, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setClimbing, setCollidable, setFrictionState, setGliding, setHurtDirection, setItemInUseTicks, setJumping, setKiller, setLastDamage, setLeashHolder, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNextArrowRemoval, setNextBeeStingerRemoval, setNoActionTicks, setRemainingAir, setRemoveWhenFarAway, setRiptiding, setShieldBlockingDelay, setSleeping, setSwimming, simulateDamage, simulateDamage, swingMainHand, swingOffHand, teleportMethods inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, asHoverEvent, assertLocation, assertNotTeleported, assertTeleported, broadcastHurtAnimation, clearMetadata, clearTeleported, collidesAt, copy, copy, createSnapshot, customName, customName, eject, equals, fromMobSpawner, getAsString, getBoundingBox, getChunk, getCustomName, getEffectivePermissions, getEntityId, getEntityProperty, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getMetadata, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSubType, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTeleportCause, getTicksLived, getTrackedPlayers, getTransitivePassengers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hashCode, hasMetadata, hasNoPhysics, hasPassengers, hasPermission, hasPermission, hasTeleported, isCustomNameVisible, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPermissionSet, isPermissionSet, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, name, playEffect, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvisible, setInvulnerable, setInWater, setLastDamageCause, setLocation, setMetadata, setName, setNoPhysics, setOnGround, setPassenger, setPersistent, setPortalCooldown, setPose, setRotation, setSilent, setSneaking, setSpawnReason, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, teamDisplayName, teleport, teleport, teleport, teleportWithoutEvent, tick, wouldCollideUsingMethods inherited from class org.bukkit.command.CommandSender.Spigot
sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.attribute.Attributable
getAttribute, registerAttributeMethods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, openBook, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
name, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.Damageable
damage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, heal, heal, resetMaxHealth, setAbsorptionAmount, setMaxHealthMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, broadcastHurtAnimation, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getAsString, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedPlayers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isPersistent, isSilent, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface io.papermc.paper.entity.Frictional
getFrictionState, setFrictionStateMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.entity.HumanEntity
closeInventory, closeInventory, discoverRecipe, discoverRecipes, dropItem, fireworkBoost, getAttackCooldown, getBedLocation, getCooldown, getDiscoveredRecipes, getEnchantmentSeed, getEnderChest, getExhaustion, getExpToLevel, getFishHook, getFoodLevel, getGameMode, getInventory, getItemInHand, getItemOnCursor, getLastDeathLocation, getMainHand, getOpenInventory, getPotentialBedLocation, getSaturatedRegenRate, getSaturation, getShoulderEntityLeft, getShoulderEntityRight, getSleepTicks, getStarvationRate, getUnsaturatedRegenRate, hasCooldown, hasDiscoveredRecipe, isBlocking, isDeeplySleeping, isHandRaised, openAnvil, openCartographyTable, openEnchanting, openGrindstone, openInventory, openInventory, openLoom, openMerchant, openMerchant, openSmithingTable, openStonecutter, openWorkbench, releaseLeftShoulderEntity, releaseRightShoulderEntity, setCooldown, setEnchantmentSeed, setExhaustion, setFoodLevel, setHurtDirection, setItemInHand, setItemOnCursor, setLastDeathLocation, setSaturatedRegenRate, setSaturation, setShoulderEntityLeft, setShoulderEntityRight, setStarvationRate, setUnsaturatedRegenRate, setWindowProperty, sleep, undiscoverRecipe, undiscoverRecipes, wakeupMethods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, canBreatheUnderwater, clearActiveItem, clearActivePotionEffects, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getForwardsMovement, getHandRaised, getHandRaisedTime, getHurtDirection, getHurtSound, getItemInUse, getItemInUseTicks, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNextArrowRemoval, getNextBeeStingerRemoval, getNoActionTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSidewaysMovement, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, getUpwardsMovement, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, knockback, playHurtAnimation, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, rayTraceEntities, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setGliding, setInvisible, setItemInUseTicks, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNextArrowRemoval, setNextBeeStingerRemoval, setNoActionTicks, setRemainingAir, setRemoveWhenFarAway, setRiptiding, setShieldBlockingDelay, setSwimming, swingHand, swingMainHand, swingOffHandMethods inherited from interface be.seeseemelk.mockbukkit.command.MessageTarget
assertNoMoreSaid, assertSaid, assertSaid, nextMessageMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.OfflinePlayer
banPlayer, banPlayer, banPlayer, banPlayer, banPlayer, getLastDeathLocation, getLocation, getPersistentDataContainer, getUniqueIdMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface org.bukkit.entity.Player
asHoverEvent, banPlayerFull, banPlayerFull, banPlayerFull, banPlayerFull, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, getName, identity, isChunkSent, isOnGround, isSneaking, lookAt, openSign, sendMessage, sendMessage, sendMessage, sendSignChange, sendSignChange, sendSignChange, setResourcePack, setRotation, setSneaking, showElderGuardianMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile, launchProjectileMethods inherited from interface be.seeseemelk.mockbukkit.sound.SoundReceiver
assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, assertSoundHeard, clearSounds
-
Constructor Details
-
PlayerMock
Constructs a newPlayerMockfor the provided server with the specified name. The players UUID will be generated from the name.- Parameters:
server- The player's server.name- The player's name.- See Also:
-
PlayerMock
public PlayerMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull String name, @NotNull @NotNull UUID uuid) Constructs a newPlayerMockfor the provided server with the specified name andUUID. Does NOT add the player to the server.- Parameters:
server- The player's server.name- The player's name.uuid- The player'sUUID.- See Also:
-
-
Method Details
-
disconnect
public boolean disconnect()Simulates a disconnection from the server.- Returns:
- True if the player was disconnected, false if they were already offline.
-
reconnect
public boolean reconnect()Simulates a connection to the server.- Returns:
- True if the player was connected, false if they were already online.
-
simulateConsumeItem
public void simulateConsumeItem(@NotNull @NotNull ItemStack consumable, boolean alwaysInflictPotionEffect) Simulates a Player consuming an Edible Item. Some edibles inflict status effects on the consumer with a certain probability.- Parameters:
consumable- The Item to consumealwaysInflictPotionEffect- Whether to always inflict a potion effect from food, regardless of probability. If this is `false` and the food item has a probability to inflict the effect lesser than 0, it will not do so. This does not prevent effects from being inflicted that have a probability of 1. The value is ignored if the edible does not inflict any potion effects.- See Also:
-
simulateConsumeItem
Simulates a Player consuming an Edible Item. If the edible inflicts status effects, these will be applied regardless of their probability.- Parameters:
consumable- The Item to consume- See Also:
-
assertItemConsumed
Asserts a Player has consumed the given Item- Parameters:
consumable- The Item to asserts has been consumed
-
getType
- Specified by:
getTypein interfaceEntity- Overrides:
getTypein classEntityMock
-
simulateBlockDamage
@Deprecated @Nullable public @Nullable BlockDamageEvent simulateBlockDamage(@NotNull @NotNull Block block) Deprecated.Simulates the player damaging a block. Note that this method does not do anything unless the player is in survival mode. IfInstaBreakis set to true by an event handler, aBlockBreakEventis immediately fired. The result will then still be whether or not theBlockDamageEventwas cancelled or not, not the laterBlockBreakEvent.- Parameters:
block- The block to damage.- Returns:
- the event that was fired,
nullif the player was not in survival gamemode.
-
simulateBlockDamage
@Nullable public @Nullable BlockDamageEvent simulateBlockDamage(@NotNull @NotNull Block block, BlockFace face) Simulates the player damaging a block. Note that this method does not do anything unless the player is in survival mode. IfInstaBreakis set to true by an event handler, aBlockBreakEventis immediately fired. The result will then still be whether or not theBlockDamageEventwas cancelled or not, not the laterBlockBreakEvent.- Parameters:
block- The block to damage.face- The face to damage the block on- Returns:
- the event that was fired,
nullif the player was not in survival gamemode.
-
simulateBlockBreak
@Deprecated @Nullable public @Nullable BlockBreakEvent simulateBlockBreak(@NotNull @NotNull Block block) Deprecated.Simulates the player breaking a block. This method will not break the block if the player is in adventure or spectator mode. If the player is in survival mode, the player will first damage the block.- Parameters:
block- The block to break.- Returns:
- The event that was fired,
nullif it wasn't or if the player was in adventure mode or in spectator mode.
-
simulateBlockBreak
@Nullable public @Nullable BlockBreakEvent simulateBlockBreak(@NotNull @NotNull Block block, BlockFace face) Simulates the player breaking a block. This method will not break the block if the player is in adventure or spectator mode. If the player is in survival mode, the player will first damage the block.- Parameters:
block- The block to break.face- The facing to break the block from- Returns:
- The event that was fired,
nullif it wasn't or if the player was in adventure mode or in spectator mode.
-
simulateBlockPlace
@Nullable public @Nullable BlockPlaceEvent simulateBlockPlace(@NotNull @NotNull Material material, @NotNull @NotNull Location location) Simulates the player placing a block. This method will not place the block if the player is in adventure or spectator mode.- Parameters:
material- The material of the location to set tolocation- The location of the material to set to- Returns:
- The event that was fired.
nullif it wasn't or the player was in adventure mode.
-
simulateInventoryClick
Simulates the player clicking an Inventory.- Parameters:
slot- The slot in the player's open inventory- Returns:
- The event that was fired.
-
simulateInventoryClick
@NotNull public @NotNull InventoryClickEvent simulateInventoryClick(@NotNull @NotNull InventoryView inventoryView, int slot) Simulates the player clicking an Inventory.- Parameters:
inventoryView- The inventory view we want to clickslot- The slot in the provided Inventory- Returns:
- The event that was fired.
-
simulateInventoryClick
@NotNull public @NotNull InventoryClickEvent simulateInventoryClick(@NotNull @NotNull InventoryView inventoryView, @NotNull @NotNull ClickType clickType, int slot) Simulates the player clicking an Inventory.- Parameters:
inventoryView- The inventory view we want to clickclickType- The click type we want to fireslot- The slot in the provided Inventory- Returns:
- The event that was fired.
-
respawn
public void respawn()This method simulates thePlayerrespawning and also calls aPlayerRespawnEvent. Should thePlayernot be dead (whenLivingEntityMock.isDead()returns false) then this will throw anUnsupportedOperationException. Otherwise, theLocationwill be set toPlayer.getBedSpawnLocation()orWorld.getSpawnLocation(). Lastly the health of thisPlayerwill be restored and set to the max health. -
simulatePlayerMove
@NotNull public @NotNull PlayerMoveEvent simulatePlayerMove(@NotNull @NotNull Location moveLocation) This method moves player instantly with respect to PlayerMoveEvent- Parameters:
moveLocation- Location to move player to- Returns:
- The event that is fired
-
setGameMode
- Specified by:
setGameModein interfaceHumanEntity- Overrides:
setGameModein classHumanEntityMock
-
isWhitelisted
public boolean isWhitelisted()- Specified by:
isWhitelistedin interfaceOfflinePlayer
-
setWhitelisted
public void setWhitelisted(boolean value) - Specified by:
setWhitelistedin interfaceOfflinePlayer
-
getPlayer
- Specified by:
getPlayerin interfaceOfflinePlayer
-
isOnline
public boolean isOnline()- Specified by:
isOnlinein interfaceOfflinePlayer
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceOfflinePlayer
-
isBanned
public boolean isBanned()- Specified by:
isBannedin interfaceOfflinePlayer
-
ban
@Nullable public <E extends BanEntry<? super PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Instant expires, @Nullable @Nullable String source) - Specified by:
banin interfaceOfflinePlayer
-
ban
@Nullable public <E extends BanEntry<? super PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Duration duration, @Nullable @Nullable String source) - Specified by:
banin interfaceOfflinePlayer
-
ban
@Nullable public @Nullable BanEntry<PlayerProfile> ban(@Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source) - Specified by:
banin interfaceOfflinePlayer
-
assertInventoryView
public void assertInventoryView(String message, InventoryType type, @NotNull @NotNull Predicate<Inventory> predicate) This method is an assertion for the currently openInventoryViewfor thisPlayer. ThePredicaterefers to the top inventory, not thePlayerInventory. It uses the methodInventoryView.getTopInventory().- Parameters:
message- The message to display upon failuretype- TheInventoryTypeyou are expectingpredicate- A customPredicateto check the openedInventory.
-
assertInventoryView
public void assertInventoryView(InventoryType type, @NotNull @NotNull Predicate<Inventory> predicate) This method is an assertion for the currently openInventoryViewfor thisPlayer. ThePredicaterefers to the top inventory, not thePlayerInventory. It uses the methodInventoryView.getTopInventory().- Parameters:
type- TheInventoryTypeyou are expectingpredicate- A customPredicateto check the openedInventory.
-
assertInventoryView
This method is an assertion for the currently openInventoryViewfor thisPlayer.- Parameters:
type- TheInventoryTypeyou are expecting
-
assertInventoryView
This method is an assertion for the currently openInventoryViewfor thisPlayer.- Parameters:
message- The message to display upon failuretype- TheInventoryTypeyou are expecting
-
updateInventory
public void updateInventory()- Specified by:
updateInventoryin interfacePlayer
-
performCommand
- Specified by:
performCommandin interfacePlayer
-
showDemoScreen
public void showDemoScreen()- Specified by:
showDemoScreenin interfacePlayer
-
isAllowingServerListings
public boolean isAllowingServerListings()- Specified by:
isAllowingServerListingsin interfacePlayer
-
getNoDamageTicks
public int getNoDamageTicks()- Specified by:
getNoDamageTicksin interfaceLivingEntity- Overrides:
getNoDamageTicksin classLivingEntityMock
-
setNoDamageTicks
public void setNoDamageTicks(int ticks) - Specified by:
setNoDamageTicksin interfaceLivingEntity- Overrides:
setNoDamageTicksin classLivingEntityMock
-
getEquipment
- Specified by:
getEquipmentin interfaceHumanEntity- Specified by:
getEquipmentin interfaceLivingEntity- Overrides:
getEquipmentin classLivingEntityMock
-
startRiptideAttack
- Specified by:
startRiptideAttackin interfaceHumanEntity
-
isConversing
public boolean isConversing()- Specified by:
isConversingin interfaceConversable
-
acceptConversationInput
- Specified by:
acceptConversationInputin interfaceConversable
-
beginConversation
- Specified by:
beginConversationin interfaceConversable
-
abandonConversation
- Specified by:
abandonConversationin interfaceConversable
-
abandonConversation
public void abandonConversation(@NotNull @NotNull Conversation conversation, @NotNull @NotNull ConversationAbandonedEvent details) - Specified by:
abandonConversationin interfaceConversable
-
getFirstPlayed
public long getFirstPlayed()- Specified by:
getFirstPlayedin interfaceOfflinePlayer
-
getLastPlayed
Deprecated.- Specified by:
getLastPlayedin interfaceOfflinePlayer
-
hasPlayedBefore
public boolean hasPlayedBefore()- Specified by:
hasPlayedBeforein interfaceOfflinePlayer
-
setLastPlayed
Deprecated, for removal: This API element is subject to removal in a future version.Moved toMockPlayerList.No longer used.- Parameters:
time- N/A.- See Also:
-
serialize
- Specified by:
serializein interfaceConfigurationSerializable
-
sendPluginMessage
public void sendPluginMessage(@NotNull @NotNull Plugin source, @NotNull @NotNull String channel, byte[] message) - Specified by:
sendPluginMessagein interfacePluginMessageRecipient
-
getListeningPluginChannels
- Specified by:
getListeningPluginChannelsin interfacePluginMessageRecipient
-
displayName
@NotNull public @NotNull net.kyori.adventure.text.Component displayName()- Specified by:
displayNamein interfacePlayer
-
displayName
public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component displayName) - Specified by:
displayNamein interfacePlayer
-
getDisplayName
Deprecated.- Specified by:
getDisplayNamein interfacePlayer
-
setDisplayName
Deprecated.- Specified by:
setDisplayNamein interfacePlayer
-
getScoreboardEntry
Description copied from class:EntityMockGets the scoreboard entry for this entity.- Overrides:
getScoreboardEntryin classEntityMock- Returns:
- The scoreboard entry.
-
playerListName
public void playerListName(@Nullable @Nullable net.kyori.adventure.text.Component name) - Specified by:
playerListNamein interfacePlayer
-
playerListName
@NotNull public @NotNull net.kyori.adventure.text.Component playerListName()- Specified by:
playerListNamein interfacePlayer
-
playerListHeader
@Nullable public @Nullable net.kyori.adventure.text.Component playerListHeader()- Specified by:
playerListHeaderin interfacePlayer
-
getPlayerListName
Deprecated.- Specified by:
getPlayerListNamein interfacePlayer
-
setPlayerListName
Deprecated.- Specified by:
setPlayerListNamein interfacePlayer
-
setCompassTarget
- Specified by:
setCompassTargetin interfacePlayer
-
getCompassTarget
- Specified by:
getCompassTargetin interfacePlayer
-
setAddress
Sets theInetSocketAddressreturned bygetAddress().- Parameters:
address- The address to set.
-
getAddress
- Specified by:
getAddressin interfaceNetworkClient- Specified by:
getAddressin interfacePlayer
-
getHAProxyAddress
- Specified by:
getHAProxyAddressin interfacePlayer
-
isTransferred
public boolean isTransferred()- Specified by:
isTransferredin interfacePlayer
-
transfer
-
retrieveCookie
@Experimental @NotNull public @NotNull CompletableFuture<byte[]> retrieveCookie(@NotNull @NotNull NamespacedKey key) - Specified by:
retrieveCookiein interfacePlayer
-
storeCookie
@Experimental public void storeCookie(@NotNull @NotNull NamespacedKey key, @NotNull @org.jetbrains.annotations.NotNull byte[] value) - Specified by:
storeCookiein interfacePlayer
-
getProtocolVersion
public int getProtocolVersion()- Specified by:
getProtocolVersionin interfaceNetworkClient
-
getVirtualHost
- Specified by:
getVirtualHostin interfaceNetworkClient
-
sendRawMessage
- Specified by:
sendRawMessagein interfaceConversable- Specified by:
sendRawMessagein interfacePlayer
-
sendRawMessage
- Specified by:
sendRawMessagein interfaceConversable
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSender- Overrides:
sendMessagein classEntityMock
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSender- Overrides:
sendMessagein classEntityMock
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSender- Overrides:
sendMessagein classEntityMock
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSender- Overrides:
sendMessagein classEntityMock
-
sendMessage
@Deprecated(forRemoval=true) public void sendMessage(@NotNull @NotNull net.kyori.adventure.identity.Identity source, @NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull net.kyori.adventure.audience.MessageType type) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience- Specified by:
sendMessagein interfaceCommandSender
-
nextComponentMessage
@Nullable public @Nullable net.kyori.adventure.text.Component nextComponentMessage()Description copied from interface:MessageTargetReturns the next message that was sent to the target.- Specified by:
nextComponentMessagein interfaceMessageTarget- Overrides:
nextComponentMessagein classEntityMock- Returns:
- The next message sent to the target.
-
kickPlayer
Deprecated.- Specified by:
kickPlayerin interfacePlayer
-
kick
public void kick() -
kick
public void kick(@Nullable @Nullable net.kyori.adventure.text.Component message) -
kick
public void kick(@Nullable @Nullable net.kyori.adventure.text.Component message, @NotNull PlayerKickEvent.Cause cause) -
chat
-
ban
@Nullable public <E extends BanEntry<? super PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Instant expires, @Nullable @Nullable String source, boolean kickPlayer) -
ban
@Nullable public <E extends BanEntry<? super PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Duration duration, @Nullable @Nullable String source, boolean kickPlayer) -
ban
@Nullable public @Nullable BanEntry<PlayerProfile> ban(@Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source, boolean kickPlayer) -
banIp
@Nullable public @Nullable BanEntry<InetAddress> banIp(@Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source, boolean kickPlayer) -
banIp
@Nullable public @Nullable BanEntry<InetAddress> banIp(@Nullable @Nullable String reason, @Nullable @Nullable Instant expires, @Nullable @Nullable String source, boolean kickPlayer) -
banIp
@Nullable public @Nullable BanEntry<InetAddress> banIp(@Nullable @Nullable String reason, @Nullable @Nullable Duration duration, @Nullable @Nullable String source, boolean kickPlayer) -
simulateSneak
Simulates sneaking.- Parameters:
sneak- Whether the player is beginning to sneak.- Returns:
- The event.
-
isSprinting
public boolean isSprinting()- Specified by:
isSprintingin interfacePlayer
-
setSprinting
public void setSprinting(boolean sprinting) - Specified by:
setSprintingin interfacePlayer
-
simulateSprint
Simulates sprinting.- Parameters:
sprint- Whether the player is beginning to sprint.- Returns:
- The event.
-
saveData
public void saveData() -
loadData
public void loadData() -
isSleepingIgnored
public boolean isSleepingIgnored()- Specified by:
isSleepingIgnoredin interfacePlayer
-
setSleepingIgnored
public void setSleepingIgnored(boolean isSleeping) - Specified by:
setSleepingIgnoredin interfacePlayer
-
playNote
Deprecated. -
playNote
public void playNote(@NotNull @NotNull Location loc, @NotNull @NotNull Instrument instrument, @NotNull @NotNull Note note) -
playSound
-
playSound
-
playSound
-
playSound
-
playSound
public void playSound(@NotNull @NotNull Location location, @NotNull @NotNull String sound, @NotNull @NotNull SoundCategory category, float volume, float pitch) -
playSound
public void playSound(@NotNull @NotNull Entity entity, @NotNull @NotNull String sound, @NotNull @NotNull SoundCategory category, float volume, float pitch, long seed) -
playSound
public void playSound(@NotNull @NotNull Entity entity, @NotNull @NotNull Sound sound, @NotNull @NotNull SoundCategory category, float volume, float pitch, long seed) -
playSound
public void playSound(@NotNull @NotNull Location location, @NotNull @NotNull String sound, @NotNull @NotNull SoundCategory category, float volume, float pitch, long seed) -
playSound
public void playSound(@NotNull @NotNull Location location, @NotNull @NotNull Sound sound, @NotNull @NotNull SoundCategory category, float volume, float pitch, long seed) -
playSound
public void playSound(@NotNull @NotNull Location location, @NotNull @NotNull Sound sound, @NotNull @NotNull SoundCategory category, float volume, float pitch) -
playSound
public void playSound(@NotNull @NotNull Entity entity, @NotNull @NotNull Sound sound, @NotNull @NotNull SoundCategory category, float volume, float pitch) -
hasFlyingFallDamage
@NotNull public @NotNull net.kyori.adventure.util.TriState hasFlyingFallDamage()- Specified by:
hasFlyingFallDamagein interfacePlayer
-
setFlyingFallDamage
public void setFlyingFallDamage(@NotNull @NotNull net.kyori.adventure.util.TriState flyingFallDamage) - Specified by:
setFlyingFallDamagein interfacePlayer
-
setHasSeenWinScreen
public void setHasSeenWinScreen(boolean hasSeenWinScreen) - Specified by:
setHasSeenWinScreenin interfacePlayer
-
hasSeenWinScreen
public boolean hasSeenWinScreen()- Specified by:
hasSeenWinScreenin interfacePlayer
-
playSound
public void playSound(@NotNull @NotNull Entity entity, @NotNull @NotNull String sound, @NotNull @NotNull SoundCategory category, float volume, float pitch) -
playSound
public void playSound(@NotNull net.kyori.adventure.sound.Sound sound) - Specified by:
playSoundin interfacenet.kyori.adventure.audience.Audience
-
playSound
public void playSound(@NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z) - Specified by:
playSoundin interfacenet.kyori.adventure.audience.Audience
-
playSound
public void playSound(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull net.kyori.adventure.sound.Sound.Emitter emitter) - Specified by:
playSoundin interfacenet.kyori.adventure.audience.Audience
-
getHeardSounds
Description copied from interface:SoundReceiverThis returns aListof everyAudioExperiencethis receiver has received.- Specified by:
getHeardSoundsin interfaceSoundReceiver- Returns:
- A mutable
Listcontaining every heard sound.
-
addHeardSound
Description copied from interface:SoundReceiverAdds a heard sound.- Specified by:
addHeardSoundin interfaceSoundReceiver- Parameters:
audioExperience- AnAudioExperiencerepresenting the heard sound.
-
stopSound
-
stopSound
-
stopSound
-
stopSound
-
stopSound
-
stopAllSounds
public void stopAllSounds()- Specified by:
stopAllSoundsin interfacePlayer
-
playEffect
@Deprecated public void playEffect(@NotNull @NotNull Location loc, @NotNull @NotNull Effect effect, int data) Deprecated.- Specified by:
playEffectin interfacePlayer
-
playEffect
public <T> void playEffect(@NotNull @NotNull Location loc, @NotNull @NotNull Effect effect, @Nullable T data) - Specified by:
playEffectin interfacePlayer
-
breakBlock
- Specified by:
breakBlockin interfacePlayer
-
sendBlockChange
@Deprecated public void sendBlockChange(@NotNull @NotNull Location loc, @NotNull @NotNull Material material, byte data) Deprecated.- Specified by:
sendBlockChangein interfacePlayer
-
sendBlockChange
- Specified by:
sendBlockChangein interfacePlayer
-
sendBlockChanges
- Specified by:
sendBlockChangesin interfacePlayer
-
sendBlockChanges
public void sendBlockChanges(@NotNull @NotNull Collection<BlockState> blocks, boolean suppressLightUpdates) - Specified by:
sendBlockChangesin interfacePlayer
-
sendSignChange
public void sendSignChange(@NotNull @NotNull Location loc, @Nullable @Nullable List<? extends net.kyori.adventure.text.Component> lines, @NotNull @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException - Specified by:
sendSignChangein interfacePlayer- Throws:
IllegalArgumentException
-
sendSignChange
Deprecated.- Specified by:
sendSignChangein interfacePlayer
-
sendSignChange
public void sendSignChange(@NotNull @NotNull Location loc, String[] lines, @NotNull @NotNull DyeColor dyeColor) throws IllegalArgumentException - Specified by:
sendSignChangein interfacePlayer- Throws:
IllegalArgumentException
-
sendSignChange
public void sendSignChange(@NotNull @NotNull Location loc, @Nullable @Nullable String @Nullable [] lines, @NotNull @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException - Specified by:
sendSignChangein interfacePlayer- Throws:
IllegalArgumentException
-
sendBlockUpdate
public void sendBlockUpdate(@NotNull @NotNull Location loc, @NotNull @NotNull TileState tileState) throws IllegalArgumentException - Specified by:
sendBlockUpdatein interfacePlayer- Throws:
IllegalArgumentException
-
sendPotionEffectChange
public void sendPotionEffectChange(@NotNull @NotNull LivingEntity entity, @NotNull @NotNull PotionEffect effect) - Specified by:
sendPotionEffectChangein interfacePlayer
-
sendPotionEffectChangeRemove
public void sendPotionEffectChangeRemove(@NotNull @NotNull LivingEntity entity, @NotNull @NotNull PotionEffectType type) - Specified by:
sendPotionEffectChangeRemovein interfacePlayer
-
sendMap
-
showWinScreen
public void showWinScreen()- Specified by:
showWinScreenin interfacePlayer
-
sendActionBar
Deprecated.- Specified by:
sendActionBarin interfacePlayer
-
sendActionBar
Deprecated.- Specified by:
sendActionBarin interfacePlayer
-
sendActionBar
@Deprecated public void sendActionBar(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent... message) Deprecated.- Specified by:
sendActionBarin interfacePlayer
-
setTitleTimes
Deprecated.- Specified by:
setTitleTimesin interfacePlayer
-
setSubtitle
Deprecated.- Specified by:
setSubtitlein interfacePlayer
-
setSubtitle
Deprecated.- Specified by:
setSubtitlein interfacePlayer
-
showTitle
@Deprecated public void showTitle(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] title) Deprecated. -
showTitle
Deprecated. -
showTitle
@Deprecated public void showTitle(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] title, @Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) Deprecated. -
showTitle
@Deprecated public void showTitle(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent title, @Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) Deprecated. -
sendTitle
Deprecated. -
updateTitle
Deprecated.- Specified by:
updateTitlein interfacePlayer
-
hideTitle
Deprecated. -
getPreviousGameMode
- Specified by:
getPreviousGameModein interfacePlayer
-
incrementStatistic
- Specified by:
incrementStatisticin interfaceOfflinePlayer
-
decrementStatistic
- Specified by:
decrementStatisticin interfaceOfflinePlayer
-
incrementStatistic
- Specified by:
incrementStatisticin interfaceOfflinePlayer
-
decrementStatistic
- Specified by:
decrementStatisticin interfaceOfflinePlayer
-
setStatistic
- Specified by:
setStatisticin interfaceOfflinePlayer
-
getStatistic
- Specified by:
getStatisticin interfaceOfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull Material material) - Specified by:
incrementStatisticin interfaceOfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull Material material) - Specified by:
decrementStatisticin interfaceOfflinePlayer
-
getStatistic
- Specified by:
getStatisticin interfaceOfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull Material material, int amount) - Specified by:
incrementStatisticin interfaceOfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull Material material, int amount) - Specified by:
decrementStatisticin interfaceOfflinePlayer
-
setStatistic
public void setStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull Material material, int newValue) - Specified by:
setStatisticin interfaceOfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull EntityType entityType) - Specified by:
incrementStatisticin interfaceOfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull EntityType entityType) - Specified by:
decrementStatisticin interfaceOfflinePlayer
-
getStatistic
public int getStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull EntityType entityType) - Specified by:
getStatisticin interfaceOfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull EntityType entityType, int amount) - Specified by:
incrementStatisticin interfaceOfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull EntityType entityType, int amount) - Specified by:
decrementStatisticin interfaceOfflinePlayer
-
setStatistic
public void setStatistic(@NotNull @NotNull Statistic statistic, @NotNull @NotNull EntityType entityType, int newValue) - Specified by:
setStatisticin interfaceOfflinePlayer
-
setPlayerTime
public void setPlayerTime(long time, boolean relative) - Specified by:
setPlayerTimein interfacePlayer
-
getPlayerTime
public long getPlayerTime()- Specified by:
getPlayerTimein interfacePlayer
-
getPlayerTimeOffset
public long getPlayerTimeOffset()- Specified by:
getPlayerTimeOffsetin interfacePlayer
-
isPlayerTimeRelative
public boolean isPlayerTimeRelative()- Specified by:
isPlayerTimeRelativein interfacePlayer
-
resetPlayerTime
public void resetPlayerTime()- Specified by:
resetPlayerTimein interfacePlayer
-
getPlayerWeather
- Specified by:
getPlayerWeatherin interfacePlayer
-
setPlayerWeather
- Specified by:
setPlayerWeatherin interfacePlayer
-
resetPlayerWeather
public void resetPlayerWeather()- Specified by:
resetPlayerWeatherin interfacePlayer
-
giveExp
public void giveExp(int amount) -
getExpCooldown
public int getExpCooldown()- Specified by:
getExpCooldownin interfacePlayer
-
setExpCooldown
public void setExpCooldown(int ticks) - Specified by:
setExpCooldownin interfacePlayer
-
giveExp
public void giveExp(int amount, boolean applyMending) -
applyMending
public int applyMending(int amount) - Specified by:
applyMendingin interfacePlayer
-
giveExpLevels
public void giveExpLevels(int amount) - Specified by:
giveExpLevelsin interfacePlayer
-
getExp
public float getExp() -
setExp
public void setExp(float exp) -
getLevel
public int getLevel() -
setLevel
public void setLevel(int level) -
getTotalExperience
public int getTotalExperience()- Specified by:
getTotalExperiencein interfacePlayer
-
setTotalExperience
public void setTotalExperience(int exp) - Specified by:
setTotalExperiencein interfacePlayer
-
calculateTotalExperiencePoints
public @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int calculateTotalExperiencePoints()- Specified by:
calculateTotalExperiencePointsin interfacePlayer
-
setExperienceLevelAndProgress
public void setExperienceLevelAndProgress(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int totalExperience) - Specified by:
setExperienceLevelAndProgressin interfacePlayer
-
getExperiencePointsNeededForNextLevel
public int getExperiencePointsNeededForNextLevel()- Specified by:
getExperiencePointsNeededForNextLevelin interfacePlayer
-
getRespawnLocation
- Specified by:
getRespawnLocationin interfaceOfflinePlayer- Specified by:
getRespawnLocationin interfacePlayer
-
getBedSpawnLocation
- Specified by:
getBedSpawnLocationin interfaceOfflinePlayer- Specified by:
getBedSpawnLocationin interfacePlayer
-
getLastLogin
public long getLastLogin()- Specified by:
getLastLoginin interfaceOfflinePlayer
-
getLastSeen
public long getLastSeen()- Specified by:
getLastSeenin interfaceOfflinePlayer
-
setRespawnLocation
- Specified by:
setRespawnLocationin interfacePlayer
-
setBedSpawnLocation
- Specified by:
setBedSpawnLocationin interfacePlayer
-
setBedSpawnLocation
- Specified by:
setBedSpawnLocationin interfacePlayer
-
setRespawnLocation
- Specified by:
setRespawnLocationin interfacePlayer
-
getAllowFlight
public boolean getAllowFlight()- Specified by:
getAllowFlightin interfacePlayer
-
setAllowFlight
public void setAllowFlight(boolean flight) - Specified by:
setAllowFlightin interfacePlayer
-
hidePlayer
Deprecated.- Specified by:
hidePlayerin interfacePlayer
-
hidePlayer
- Specified by:
hidePlayerin interfacePlayer
-
showPlayer
Deprecated.- Specified by:
showPlayerin interfacePlayer
-
showPlayer
- Specified by:
showPlayerin interfacePlayer
-
canSee
-
hideEntity
- Specified by:
hideEntityin interfacePlayer
-
showEntity
- Specified by:
showEntityin interfacePlayer
-
canSee
-
isListed
-
unlistPlayer
- Specified by:
unlistPlayerin interfacePlayer
-
listPlayer
- Specified by:
listPlayerin interfacePlayer
-
isFlying
public boolean isFlying() -
setFlying
public void setFlying(boolean value) -
simulateToggleFlight
Simulates toggling flight.- Parameters:
fly- Whether the player is starting to fly.- Returns:
- The event.
-
getFlySpeed
public float getFlySpeed()- Specified by:
getFlySpeedin interfacePlayer
-
setFlySpeed
public void setFlySpeed(float value) - Specified by:
setFlySpeedin interfacePlayer
-
getWalkSpeed
public float getWalkSpeed()- Specified by:
getWalkSpeedin interfacePlayer
-
setWalkSpeed
public void setWalkSpeed(float value) - Specified by:
setWalkSpeedin interfacePlayer
-
setTexturePack
Deprecated.- Specified by:
setTexturePackin interfacePlayer
-
setResourcePack
Deprecated.- Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
- Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
@Deprecated public void setResourcePack(@NotNull @NotNull String url, @Nullable @org.jetbrains.annotations.Nullable byte[] hash, @Nullable @Nullable String prompt) Deprecated.- Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
- Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
@Deprecated public void setResourcePack(@NotNull @NotNull String url, @Nullable @org.jetbrains.annotations.Nullable byte[] hash, @Nullable @Nullable String prompt, boolean force) Deprecated.- Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
public void setResourcePack(@NotNull @NotNull String url, byte @Nullable [] hash, @Nullable @Nullable net.kyori.adventure.text.Component prompt, boolean force) - Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
public void setResourcePack(@NotNull @NotNull UUID uuid, @NotNull @NotNull String url, @NotNull @NotNull String hash, @Nullable @Nullable net.kyori.adventure.text.Component resourcePackPrompt, boolean required) - Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
public void setResourcePack(@NotNull @NotNull UUID uuid, @NotNull @NotNull String url, byte @Nullable [] hash, @Nullable @Nullable net.kyori.adventure.text.Component prompt, boolean force) - Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
@Deprecated(since="1.20") public void setResourcePack(@NotNull @NotNull UUID uuid, @NotNull @NotNull String s, @Nullable @org.jetbrains.annotations.Nullable byte[] bytes, @Nullable @Nullable String s1, boolean b) Deprecated.- Specified by:
setResourcePackin interfacePlayer
-
getScoreboard
- Specified by:
getScoreboardin interfacePlayer
-
setScoreboard
- Specified by:
setScoreboardin interfacePlayer
-
getWorldBorder
- Specified by:
getWorldBorderin interfacePlayer
-
setWorldBorder
- Specified by:
setWorldBorderin interfacePlayer
-
setHealth
public void setHealth(double health) - Specified by:
setHealthin interfaceDamageable- Overrides:
setHealthin classLivingEntityMock
-
isHealthScaled
public boolean isHealthScaled()- Specified by:
isHealthScaledin interfacePlayer
-
setHealthScaled
public void setHealthScaled(boolean scale) - Specified by:
setHealthScaledin interfacePlayer
-
getHealthScale
public double getHealthScale()- Specified by:
getHealthScalein interfacePlayer
-
setHealthScale
public void setHealthScale(double scale) - Specified by:
setHealthScalein interfacePlayer
-
sendHealthUpdate
public void sendHealthUpdate(double health, int foodLevel, float saturationLevel) - Specified by:
sendHealthUpdatein interfacePlayer
-
sendHealthUpdate
public void sendHealthUpdate()- Specified by:
sendHealthUpdatein interfacePlayer
-
getSpectatorTarget
- Specified by:
getSpectatorTargetin interfacePlayer
-
setSpectatorTarget
- Specified by:
setSpectatorTargetin interfacePlayer
-
sendTitle
Deprecated. -
sendTitle
Deprecated. -
nextTitle
- Returns:
- The next title sent to the player.
-
nextSubTitle
- Returns:
- The next subtitle sent to the player.
-
resetTitle
public void resetTitle()- Specified by:
resetTitlein interfacenet.kyori.adventure.audience.Audience- Specified by:
resetTitlein interfacePlayer
-
showBossBar
public void showBossBar(@NotNull @NotNull net.kyori.adventure.bossbar.BossBar bar) - Specified by:
showBossBarin interfacenet.kyori.adventure.audience.Audience
-
hideBossBar
public void hideBossBar(@NotNull @NotNull net.kyori.adventure.bossbar.BossBar bar) - Specified by:
hideBossBarin interfacenet.kyori.adventure.audience.Audience
-
getBossBars
Gets an unmodifiable set of all active boss bars currently shown to this player. Helper method toactiveBossBars().- See Also:
-
activeBossBars
@NotNull public @UnmodifiableView @NotNull Iterable<? extends net.kyori.adventure.bossbar.BossBar> activeBossBars()- Specified by:
activeBossBarsin interfacenet.kyori.adventure.bossbar.BossBarViewer- Specified by:
activeBossBarsin interfacePlayer
-
spawnParticle
public void spawnParticle(@NotNull @NotNull Particle particle, @NotNull @NotNull Location location, int count) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public void spawnParticle(@NotNull @NotNull Particle particle, double x, double y, double z, int count) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, @NotNull @NotNull Location location, int count, T data) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, double x, double y, double z, int count, T data) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public void spawnParticle(@NotNull @NotNull Particle particle, @NotNull @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public void spawnParticle(@NotNull @NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, @NotNull @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public void spawnParticle(@NotNull @NotNull Particle particle, @NotNull @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public void spawnParticle(@NotNull @NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, @NotNull @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, @NotNull @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force) - Specified by:
spawnParticlein interfacePlayer
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force) - Specified by:
spawnParticlein interfacePlayer
-
getAdvancementProgress
@NotNull public @NotNull AdvancementProgress getAdvancementProgress(@NotNull @NotNull Advancement advancement) - Specified by:
getAdvancementProgressin interfacePlayer
-
getLocale
-
getAffectsSpawning
public boolean getAffectsSpawning()- Specified by:
getAffectsSpawningin interfacePlayer
-
setAffectsSpawning
public void setAffectsSpawning(boolean affects) - Specified by:
setAffectsSpawningin interfacePlayer
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistancein interfacePlayer
-
setViewDistance
public void setViewDistance(int viewDistance) - Specified by:
setViewDistancein interfacePlayer
-
getSimulationDistance
public int getSimulationDistance()- Specified by:
getSimulationDistancein interfacePlayer
-
setSimulationDistance
public void setSimulationDistance(int simulationDistance) - Specified by:
setSimulationDistancein interfacePlayer
-
getNoTickViewDistance
Deprecated.- Specified by:
getNoTickViewDistancein interfacePlayer
-
setNoTickViewDistance
Deprecated.- Specified by:
setNoTickViewDistancein interfacePlayer
-
getSendViewDistance
public int getSendViewDistance()- Specified by:
getSendViewDistancein interfacePlayer
-
setSendViewDistance
public void setSendViewDistance(int viewDistance) - Specified by:
setSendViewDistancein interfacePlayer
-
getPlayerListHeader
- Specified by:
getPlayerListHeaderin interfacePlayer
-
setPlayerListHeader
- Specified by:
setPlayerListHeaderin interfacePlayer
-
updateCommands
public void updateCommands()- Specified by:
updateCommandsin interfacePlayer
-
getClientViewDistance
public int getClientViewDistance()- Specified by:
getClientViewDistancein interfacePlayer
-
locale
-
openBook
-
openSign
- Specified by:
openSignin interfaceHumanEntity- Specified by:
openSignin interfacePlayer
-
setResourcePack
- Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
public void setResourcePack(@NotNull @NotNull String url, @NotNull @NotNull String hash, boolean required) - Specified by:
setResourcePackin interfacePlayer
-
setResourcePack
public void setResourcePack(@NotNull @NotNull String url, @NotNull @NotNull String hash, boolean required, @Nullable @Nullable net.kyori.adventure.text.Component resourcePackPrompt) - Specified by:
setResourcePackin interfacePlayer
-
getResourcePackStatus
- Specified by:
getResourcePackStatusin interfacePlayer
-
getResourcePackHash
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getResourcePackHashin interfacePlayer
-
hasResourcePack
public boolean hasResourcePack()- Specified by:
hasResourcePackin interfacePlayer
-
addResourcePack
public void addResourcePack(@NotNull @NotNull UUID id, @NotNull @NotNull String url, @Nullable @org.jetbrains.annotations.Nullable byte[] hash, @Nullable @Nullable String prompt, boolean force) - Specified by:
addResourcePackin interfacePlayer
-
removeResourcePack
- Specified by:
removeResourcePackin interfacePlayer
-
removeResourcePacks
public void removeResourcePacks()- Specified by:
removeResourcePacksin interfacePlayer
-
getPlayerProfile
- Specified by:
getPlayerProfilein interfaceOfflinePlayer- Specified by:
getPlayerProfilein interfacePlayer
-
setPlayerProfile
- Specified by:
setPlayerProfilein interfacePlayer
-
getCooldownPeriod
public float getCooldownPeriod()- Specified by:
getCooldownPeriodin interfacePlayer
-
getCooledAttackStrength
public float getCooledAttackStrength(float adjustTicks) - Specified by:
getCooledAttackStrengthin interfacePlayer
-
resetCooldown
public void resetCooldown()- Specified by:
resetCooldownin interfacePlayer
-
getClientOption
- Specified by:
getClientOptionin interfacePlayer
-
boostElytra
- Specified by:
boostElytrain interfacePlayer
-
sendOpLevel
public void sendOpLevel(byte level) - Specified by:
sendOpLevelin interfacePlayer
-
addAdditionalChatCompletions
- Specified by:
addAdditionalChatCompletionsin interfacePlayer
-
removeAdditionalChatCompletions
- Specified by:
removeAdditionalChatCompletionsin interfacePlayer
-
getClientBrandName
- Specified by:
getClientBrandNamein interfacePlayer
-
addCustomChatCompletions
- Specified by:
addCustomChatCompletionsin interfacePlayer
-
removeCustomChatCompletions
- Specified by:
removeCustomChatCompletionsin interfacePlayer
-
setCustomChatCompletions
- Specified by:
setCustomChatCompletionsin interfacePlayer
-
lookAt
-
lookAt
public void lookAt(@NotNull @NotNull Entity entity, @NotNull @NotNull LookAnchor playerAnchor, @NotNull @NotNull LookAnchor entityAnchor) -
showElderGuardian
public void showElderGuardian(boolean silent) - Specified by:
showElderGuardianin interfacePlayer
-
getWardenWarningCooldown
public int getWardenWarningCooldown()- Specified by:
getWardenWarningCooldownin interfacePlayer
-
setWardenWarningCooldown
public void setWardenWarningCooldown(int cooldown) - Specified by:
setWardenWarningCooldownin interfacePlayer
-
getWardenTimeSinceLastWarning
public int getWardenTimeSinceLastWarning()- Specified by:
getWardenTimeSinceLastWarningin interfacePlayer
-
setWardenTimeSinceLastWarning
public void setWardenTimeSinceLastWarning(int time) - Specified by:
setWardenTimeSinceLastWarningin interfacePlayer
-
getWardenWarningLevel
public int getWardenWarningLevel()- Specified by:
getWardenWarningLevelin interfacePlayer
-
setWardenWarningLevel
public void setWardenWarningLevel(int warningLevel) - Specified by:
setWardenWarningLevelin interfacePlayer
-
increaseWardenWarningLevel
public void increaseWardenWarningLevel()- Specified by:
increaseWardenWarningLevelin interfacePlayer
-
attack
- Specified by:
attackin interfaceLivingEntity- Overrides:
attackin classLivingEntityMock
-
startUsingItem
- Specified by:
startUsingItemin interfaceLivingEntity- Overrides:
startUsingItemin classLivingEntityMock
-
completeUsingActiveItem
public void completeUsingActiveItem()- Specified by:
completeUsingActiveItemin interfaceLivingEntity- Overrides:
completeUsingActiveItemin classLivingEntityMock
-
getActiveItemRemainingTime
public int getActiveItemRemainingTime()- Specified by:
getActiveItemRemainingTimein interfaceLivingEntity- Overrides:
getActiveItemRemainingTimein classLivingEntityMock
-
setActiveItemRemainingTime
public void setActiveItemRemainingTime(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int ticks) - Specified by:
setActiveItemRemainingTimein interfaceLivingEntity- Overrides:
setActiveItemRemainingTimein classLivingEntityMock
-
hasActiveItem
public boolean hasActiveItem()- Specified by:
hasActiveItemin interfaceLivingEntity- Overrides:
hasActiveItemin classLivingEntityMock
-
getActiveItemUsedTime
public int getActiveItemUsedTime()- Specified by:
getActiveItemUsedTimein interfaceLivingEntity- Overrides:
getActiveItemUsedTimein classLivingEntityMock
-
getActiveItemHand
- Specified by:
getActiveItemHandin interfaceLivingEntity- Overrides:
getActiveItemHandin classLivingEntityMock
-
broadcastSlotBreak
- Specified by:
broadcastSlotBreakin interfaceLivingEntity- Overrides:
broadcastSlotBreakin classLivingEntityMock
-
getIdleDuration
- Specified by:
getIdleDurationin interfacePlayer
-
resetIdleDuration
public void resetIdleDuration()- Specified by:
resetIdleDurationin interfacePlayer
-
getSentChunkKeys
- Specified by:
getSentChunkKeysin interfacePlayer
-
getSentChunks
- Specified by:
getSentChunksin interfacePlayer
-
isChunkSent
public boolean isChunkSent(long chunkKey) - Specified by:
isChunkSentin interfacePlayer
-
getTrackedBy
- Specified by:
getTrackedByin interfaceEntity- Overrides:
getTrackedByin classEntityMock
-
broadcastSlotBreak
public void broadcastSlotBreak(@NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull Collection<Player> players) - Specified by:
broadcastSlotBreakin interfaceLivingEntity- Overrides:
broadcastSlotBreakin classLivingEntityMock
-
damageItemStack
- Specified by:
damageItemStackin interfaceLivingEntity- Overrides:
damageItemStackin classLivingEntityMock
-
damageItemStack
- Specified by:
damageItemStackin interfaceLivingEntity- Overrides:
damageItemStackin classLivingEntityMock
-
canUseEquipmentSlot
- Specified by:
canUseEquipmentSlotin interfaceLivingEntity- Overrides:
canUseEquipmentSlotin classLivingEntityMock
-
sendExperienceChange
public void sendExperienceChange(float progress) - Specified by:
sendExperienceChangein interfacePlayer
-
sendExperienceChange
public void sendExperienceChange(float progress, int level) - Specified by:
sendExperienceChangein interfacePlayer
-
sendBlockDamage
- Specified by:
sendBlockDamagein interfacePlayer
-
sendMultiBlockChange
- Specified by:
sendMultiBlockChangein interfacePlayer
-
sendBlockDamage
- Specified by:
sendBlockDamagein interfacePlayer
-
sendHurtAnimation
public void sendHurtAnimation(float yaw) - Specified by:
sendHurtAnimationin interfacePlayer
-
sendLinks
-
sendMultiBlockChange
public void sendMultiBlockChange(@NotNull @NotNull Map<? extends Position, BlockData> blockChanges, boolean suppressLightUpdates) - Specified by:
sendMultiBlockChangein interfacePlayer
-
sendBlockDamage
public void sendBlockDamage(@NotNull @NotNull Location loc, float progress, @NotNull @NotNull Entity source) - Specified by:
sendBlockDamagein interfacePlayer
-
getPing
public int getPing() -
teleport
public boolean teleport(@NotNull @NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause, TeleportFlag @NotNull ... flags) - Specified by:
teleportin interfaceEntity- Overrides:
teleportin classEntityMock
-
teleportAsync
@NotNull public @NotNull CompletableFuture<Boolean> teleportAsync(@NotNull @NotNull Location loc, @NotNull PlayerTeleportEvent.TeleportCause cause, @NotNull @NotNull TeleportFlag @NotNull ... teleportFlags) - Specified by:
teleportAsyncin interfaceEntity- Overrides:
teleportAsyncin classEntityMock
-
sendEquipmentChange
public void sendEquipmentChange(@NotNull @NotNull LivingEntity entity, @NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull ItemStack item) - Specified by:
sendEquipmentChangein interfacePlayer
-
sendEquipmentChange
public void sendEquipmentChange(@NotNull @NotNull LivingEntity entity, @NotNull @NotNull Map<EquipmentSlot, ItemStack> equipmentChanges) - Specified by:
sendEquipmentChangein interfacePlayer
-
isOp
public boolean isOp()- Specified by:
isOpin interfaceServerOperator- Overrides:
isOpin classEntityMock
-
setOp
public void setOp(boolean isOperator) - Specified by:
setOpin interfaceServerOperator- Overrides:
setOpin classEntityMock
-
getEntityState
Description copied from class:EntityMockGet the current state of this entity- Overrides:
getEntityStatein classLivingEntityMock- Returns:
- The current state of this entity
-
remove
public void remove()- Specified by:
removein interfaceEntity- Overrides:
removein classLivingEntityMock
-
spigot
- Specified by:
spigotin interfaceCommandSender- Specified by:
spigotin interfaceEntity- Specified by:
spigotin interfacePlayer- Overrides:
spigotin classEntityMock
-
sendEntityEffect
public void sendEntityEffect(@NotNull @NotNull EntityEffect entityEffect, @NotNull @NotNull Entity entity) - Specified by:
sendEntityEffectin interfacePlayer
-
setLocale
Sets player locale- Parameters:
locale- the locale
-
MockPlayerList.