Package be.seeseemelk.mockbukkit.entity
Class PlayerMock
java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
be.seeseemelk.mockbukkit.entity.LivingEntityMock
be.seeseemelk.mockbukkit.entity.HumanEntityMock
be.seeseemelk.mockbukkit.entity.PlayerMock
- All Implemented Interfaces:
MessageTarget,SoundReceiver,com.destroystokyo.paper.network.NetworkClient,io.papermc.paper.entity.Frictional,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>,org.bukkit.attribute.Attributable,org.bukkit.command.CommandSender,org.bukkit.configuration.serialization.ConfigurationSerializable,org.bukkit.conversations.Conversable,org.bukkit.entity.AnimalTamer,org.bukkit.entity.Damageable,org.bukkit.entity.Entity,org.bukkit.entity.HumanEntity,org.bukkit.entity.LivingEntity,org.bukkit.entity.Player,org.bukkit.inventory.InventoryHolder,org.bukkit.metadata.Metadatable,org.bukkit.Nameable,org.bukkit.OfflinePlayer,org.bukkit.permissions.Permissible,org.bukkit.permissions.ServerOperator,org.bukkit.persistence.PersistentDataHolder,org.bukkit.plugin.messaging.PluginMessageRecipient,org.bukkit.projectiles.ProjectileSource
Mock implementation of a
Player.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassMock implementation of aPlayer.Spigot.Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.SpigotNested classes/interfaces inherited from interface org.bukkit.entity.Player
org.bukkit.entity.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
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 org.bukkit.conversations.Conversation conversation) voidabandonConversation(@NotNull org.bukkit.conversations.Conversation conversation, @NotNull org.bukkit.conversations.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, org.bukkit.event.inventory.InventoryType type) This method is an assertion for the currently openInventoryViewfor thisPlayer.voidassertInventoryView(String message, org.bukkit.event.inventory.InventoryType type, @NotNull Predicate<org.bukkit.inventory.Inventory> predicate) This method is an assertion for the currently openInventoryViewfor thisPlayer.voidassertInventoryView(org.bukkit.event.inventory.InventoryType type) This method is an assertion for the currently openInventoryViewfor thisPlayer.voidassertInventoryView(org.bukkit.event.inventory.InventoryType type, @NotNull Predicate<org.bukkit.inventory.Inventory> predicate) This method is an assertion for the currently openInventoryViewfor thisPlayer.voidassertItemConsumed(@NotNull org.bukkit.inventory.ItemStack consumable) Asserts a Player has consumed the given Itemvoidattack(@NotNull org.bukkit.entity.Entity target) <E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>>
E<E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>>
Eban(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer) <E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>>
E<E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>>
Eban(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer) @Nullable org.bukkit.BanEntry<org.bukkit.profile.PlayerProfile> @Nullable org.bukkit.BanEntry<org.bukkit.profile.PlayerProfile> @Nullable org.bukkit.BanEntry<InetAddress> banIp(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer) @Nullable org.bukkit.BanEntry<InetAddress> banIp(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer) @Nullable org.bukkit.BanEntry<InetAddress> booleanbeginConversation(@NotNull org.bukkit.conversations.Conversation conversation) @Nullable org.bukkit.entity.FireworkboostElytra(@NotNull org.bukkit.inventory.ItemStack firework) booleanbreakBlock(@NotNull org.bukkit.block.Block block) voidbroadcastSlotBreak(@NotNull org.bukkit.inventory.EquipmentSlot slot) voidbroadcastSlotBreak(@NotNull org.bukkit.inventory.EquipmentSlot slot, @NotNull Collection<org.bukkit.entity.Player> players) @org.jetbrains.annotations.Range(from=0L, to=2147483647L) intbooleancanSee(@NotNull org.bukkit.entity.Entity entity) booleancanSee(@NotNull org.bukkit.entity.Player player) voidvoidvoiddamageItemStack(@NotNull org.bukkit.inventory.EquipmentSlot slot, int amount) @NotNull org.bukkit.inventory.ItemStackdamageItemStack(@NotNull org.bukkit.inventory.ItemStack stack, int amount) voiddecrementStatistic(@NotNull org.bukkit.Statistic statistic) voiddecrementStatistic(@NotNull org.bukkit.Statistic statistic, int amount) voiddecrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material) voiddecrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material, int amount) voiddecrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType) voiddecrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType, int amount) booleanSimulates a disconnection from the server.@NotNull net.kyori.adventure.text.ComponentvoiddisplayName(@Nullable net.kyori.adventure.text.Component displayName) @NotNull org.bukkit.inventory.EquipmentSlotintint@Nullable InetSocketAddress@NotNull org.bukkit.advancement.AdvancementProgressgetAdvancementProgress(@NotNull org.bukkit.advancement.Advancement advancement) booleanboolean@Nullable org.bukkit.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 com.destroystokyo.paper.ClientOption<T> option) int@NotNull org.bukkit.LocationfloatfloatgetCooledAttackStrength(float adjustTicks) @NotNull StringDeprecated.protected EntityStateGet the current state of this entityorg.bukkit.inventory.EntityEquipmentfloatgetExp()intintdoubledoublegetEyeHeight(boolean ignorePose) longfloat@Nullable InetSocketAddressdouble@NotNull List<AudioExperience> This returns aListof everyAudioExperiencethis receiver has received.@NotNull DurationlonglongDeprecated.longintgetLevel()@NotNull StringintintDeprecated.intgetPing()org.bukkit.entity.Player@NotNull StringDeprecated.@NotNull com.destroystokyo.paper.profile.PlayerProfilelonglongorg.bukkit.WeatherType@Nullable org.bukkit.GameModeint@Nullable StringDeprecated, for removal: This API element is subject to removal in a future version.@Nullable org.bukkit.event.player.PlayerResourcePackStatusEvent.Status@Nullable org.bukkit.Location@NotNull org.bukkit.scoreboard.Scoreboard@NotNull StringGets the scoreboard entry for this entity.int@NotNull @Unmodifiable Set<org.bukkit.Chunk> intorg.bukkit.entity.EntityintgetStatistic(@NotNull org.bukkit.Statistic statistic) intgetStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material) intgetStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType) int@NotNull Set<org.bukkit.entity.Player> @NotNull org.bukkit.entity.EntityTypegetType()int@Nullable InetSocketAddressfloatintintint@Nullable org.bukkit.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 org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.entity.Entity entity) voidhidePlayer(@NotNull org.bukkit.entity.Player player) Deprecated.voidhidePlayer(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.entity.Player player) voidDeprecated.voidvoidincrementStatistic(@NotNull org.bukkit.Statistic statistic) voidincrementStatistic(@NotNull org.bukkit.Statistic statistic, int amount) voidincrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material) voidincrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material, int amount) voidincrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType) voidincrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType, int amount) booleanbooleanisBanned()booleanisChunkSent(long chunkKey) booleanbooleanbooleanisFlying()booleanbooleanisListed(@NotNull org.bukkit.entity.Player other) booleanisOnline()booleanisOp()booleanbooleanbooleanbooleanbooleanbooleanvoidkick()voidkick(@Nullable net.kyori.adventure.text.Component message) voidkick(@Nullable net.kyori.adventure.text.Component message, @NotNull org.bukkit.event.player.PlayerKickEvent.Cause cause) voidkickPlayer(String message) Deprecated.<T extends org.bukkit.entity.Projectile>
TlaunchProjectile(@NotNull Class<? extends T> projectile, @Nullable org.bukkit.util.Vector velocity, @Nullable Consumer<? super T> function) booleanlistPlayer(@NotNull org.bukkit.entity.Player other) voidloadData()@NotNull Localelocale()voidlookAt(double x, double y, double z, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor) voidlookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor) @Nullable String@Nullable StringvoidopenBook(@NotNull org.bukkit.inventory.ItemStack book) voidopenSign(@NotNull org.bukkit.block.Sign sign, @NotNull org.bukkit.block.sign.Side side) booleanperformCommand(@NotNull String command) voidplayEffect(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.Effect effect, int data) Deprecated.<T> voidplayEffect(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.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) voidplayNote(@NotNull org.bukkit.Location loc, byte instrument, byte note) Deprecated.voidplayNote(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.Instrument instrument, @NotNull org.bukkit.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 org.bukkit.Location location, @NotNull String sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch) voidplaySound(@NotNull org.bukkit.Location location, @NotNull String sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) voidplaySound(@NotNull org.bukkit.Location location, @NotNull org.bukkit.Sound sound, float volume, float pitch) voidplaySound(@NotNull org.bukkit.Location location, @NotNull org.bukkit.Sound sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch) voidplaySound(@NotNull org.bukkit.Location location, @NotNull org.bukkit.Sound sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) voidplaySound(@NotNull org.bukkit.entity.Entity entity, @NotNull String sound, float volume, float pitch) voidplaySound(@NotNull org.bukkit.entity.Entity entity, @NotNull String sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch) voidplaySound(@NotNull org.bukkit.entity.Entity entity, @NotNull String sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) voidplaySound(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Sound sound, float volume, float pitch) voidplaySound(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Sound sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch) voidplaySound(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Sound sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) booleanSimulates a connection to the server.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 org.bukkit.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 org.bukkit.Location loc, @NotNull org.bukkit.Material material, byte data) Deprecated.voidsendBlockChange(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.block.data.BlockData block) voidsendBlockChanges(@NotNull Collection<org.bukkit.block.BlockState> blocks) voidsendBlockChanges(@NotNull Collection<org.bukkit.block.BlockState> blocks, boolean suppressLightUpdates) voidsendBlockDamage(@NotNull org.bukkit.Location loc, float progress) voidsendBlockDamage(@NotNull org.bukkit.Location loc, float progress, int destroyerIdentity) voidsendBlockDamage(@NotNull org.bukkit.Location loc, float progress, @NotNull org.bukkit.entity.Entity source) voidsendBlockUpdate(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.block.TileState tileState) voidsendEquipmentChange(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull Map<org.bukkit.inventory.EquipmentSlot, org.bukkit.inventory.ItemStack> equipmentChanges) voidsendEquipmentChange(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull org.bukkit.inventory.EquipmentSlot slot, @NotNull org.bukkit.inventory.ItemStack item) voidsendExperienceChange(float progress) voidsendExperienceChange(float progress, int level) voidvoidsendHealthUpdate(double health, int foodLevel, float saturationLevel) voidsendHurtAnimation(float yaw) voidsendMap(@NotNull org.bukkit.map.MapView map) voidsendMultiBlockChange(@NotNull Map<? extends io.papermc.paper.math.Position, org.bukkit.block.data.BlockData> blockChanges) voidsendMultiBlockChange(@NotNull Map<? extends io.papermc.paper.math.Position, org.bukkit.block.data.BlockData> blockChanges, boolean suppressLightUpdates) voidsendOpLevel(byte level) voidsendPluginMessage(@NotNull org.bukkit.plugin.Plugin source, @NotNull String channel, byte[] message) voidsendPotionEffectChange(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull org.bukkit.potion.PotionEffect effect) voidsendPotionEffectChangeRemove(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull org.bukkit.potion.PotionEffectType type) voidsendRawMessage(@Nullable String message) voidsendRawMessage(@Nullable UUID sender, @NotNull String message) voidsendSignChange(@NotNull org.bukkit.Location loc, @Nullable String @Nullable [] lines, @NotNull org.bukkit.DyeColor dyeColor, boolean hasGlowingText) voidsendSignChange(@NotNull org.bukkit.Location loc, String[] lines) Deprecated.voidsendSignChange(@NotNull org.bukkit.Location loc, String[] lines, @NotNull org.bukkit.DyeColor dyeColor) voidsendSignChange(@NotNull org.bukkit.Location loc, @Nullable List<? extends net.kyori.adventure.text.Component> lines, @NotNull org.bukkit.DyeColor dyeColor, boolean hasGlowingText) voidsendTitle(@NotNull com.destroystokyo.paper.Title title) Deprecated.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 org.bukkit.Location loc) voidsetBedSpawnLocation(@Nullable org.bukkit.Location loc, boolean override) voidsetCompassTarget(@NotNull org.bukkit.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 org.bukkit.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 com.destroystokyo.paper.profile.PlayerProfile profile) voidsetPlayerTime(long time, boolean relative) voidsetPlayerWeather(@NotNull org.bukkit.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 org.bukkit.Location loc) voidsetRespawnLocation(@Nullable org.bukkit.Location loc, boolean override) voidsetScoreboard(@NotNull org.bukkit.scoreboard.Scoreboard scoreboard) voidsetSendViewDistance(int viewDistance) voidsetSimulationDistance(int simulationDistance) voidsetSleepingIgnored(boolean isSleeping) voidsetSneaking(boolean sneaking) voidsetSpectatorTarget(org.bukkit.entity.Entity entity) voidsetSprinting(boolean sprinting) voidsetStatistic(@NotNull org.bukkit.Statistic statistic, int newValue) voidsetStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material, int newValue) voidsetStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.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 org.bukkit.WorldBorder border) voidshowBossBar(@NotNull net.kyori.adventure.bossbar.BossBar bar) voidvoidshowElderGuardian(boolean silent) voidshowEntity(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.entity.Entity entity) voidshowPlayer(@NotNull org.bukkit.entity.Player player) Deprecated.voidshowPlayer(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.entity.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 org.bukkit.event.block.BlockBreakEventsimulateBlockBreak(@NotNull org.bukkit.block.Block block) Simulates the player breaking a block.@Nullable org.bukkit.event.block.BlockDamageEventsimulateBlockDamage(@NotNull org.bukkit.block.Block block) Simulates the player damaging a block.protected @NotNull org.bukkit.event.block.BlockDamageEventsimulateBlockDamagePure(@NotNull org.bukkit.block.Block block) Simulates the player damaging a block just likesimulateBlockDamage(Block).@Nullable org.bukkit.event.block.BlockPlaceEventsimulateBlockPlace(@NotNull org.bukkit.Material material, @NotNull org.bukkit.Location location) Simulates the player placing a block.voidsimulateConsumeItem(@NotNull org.bukkit.inventory.ItemStack consumable) Simulates a Player consuming an Edible Item.voidsimulateConsumeItem(@NotNull org.bukkit.inventory.ItemStack consumable, boolean alwaysInflictPotionEffect) Simulates a Player consuming an Edible Item.@NotNull org.bukkit.event.inventory.InventoryClickEventsimulateInventoryClick(int slot) Simulates the player clicking an Inventory.@NotNull org.bukkit.event.inventory.InventoryClickEventsimulateInventoryClick(@NotNull org.bukkit.inventory.InventoryView inventoryView, int slot) Simulates the player clicking an Inventory.@NotNull org.bukkit.event.inventory.InventoryClickEventsimulateInventoryClick(@NotNull org.bukkit.inventory.InventoryView inventoryView, @NotNull org.bukkit.event.inventory.ClickType clickType, int slot) Simulates the player clicking an Inventory.@NotNull org.bukkit.event.player.PlayerMoveEventsimulatePlayerMove(@NotNull org.bukkit.Location moveLocation) This method moves player instantly with respect to PlayerMoveEvent@NotNull org.bukkit.event.player.PlayerToggleSneakEventsimulateSneak(boolean sneak) Simulates sneaking.@NotNull org.bukkit.event.player.PlayerToggleSprintEventsimulateSprint(boolean sprint) Simulates sprinting.@NotNull org.bukkit.event.player.PlayerToggleFlightEventsimulateToggleFlight(boolean fly) Simulates toggling flight.voidspawnParticle(@NotNull org.bukkit.Particle particle, double x, double y, double z, int count) voidspawnParticle(@NotNull org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) voidspawnParticle(@NotNull org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> voidspawnParticle(@NotNull org.bukkit.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 org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, double x, double y, double z, int count, T data) voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int count) voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ) voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, T data) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int count, T data) @NotNull org.bukkit.entity.Player.Spigotspigot()voidstartUsingItem(@NotNull org.bukkit.inventory.EquipmentSlot hand) voidvoidvoidvoidstopSound(@NotNull org.bukkit.Sound sound) voidstopSound(@NotNull org.bukkit.SoundCategory category) voidstopSound(@NotNull org.bukkit.Sound sound, @Nullable org.bukkit.SoundCategory category) voidstoreCookie(@NotNull org.bukkit.NamespacedKey key, @org.jetbrains.annotations.NotNull byte[] value) booleanteleport(@NotNull org.bukkit.Location location, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, io.papermc.paper.entity.TeleportFlag @NotNull ... flags) @NotNull CompletableFuture<Boolean> teleportAsync(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull ... teleportFlags) voidbooleanunlistPlayer(@NotNull org.bukkit.entity.Player other) voidvoidvoidupdateTitle(@NotNull com.destroystokyo.paper.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, isSleeping, 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, setSleeping, setStarvationRate, setUnsaturatedRegenRate, setWindowProperty, sleep, undiscoverRecipe, undiscoverRecipes, wakeupMethods inherited from class be.seeseemelk.mockbukkit.entity.LivingEntityMock
addPotionEffect, addPotionEffect, addPotionEffect, addPotionEffects, addPotionEffects, canBreatheUnderwater, canUseEquipmentSlot, clearActiveItem, clearActivePotionEffects, damage, damage, damage, getAbsorptionAmount, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, 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, isSwimming, isValid, knockback, launchProjectile, launchProjectile, playHurtAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, registerAttribute, remove, removePotionEffect, resetMaxHealth, setAbsorptionAmount, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setFrictionState, setGliding, setHurtDirection, setItemInUseTicks, setJumping, setKiller, setLastDamage, setLeashHolder, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNextArrowRemoval, setNextBeeStingerRemoval, setNoActionTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, simulateDamage, simulateDamage, swingMainHand, swingOffHand, teleportMethods inherited from class be.seeseemelk.mockbukkit.entity.EntityMock
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, asHoverEvent, assertLocation, assertNotTeleported, assertTeleported, clearMetadata, clearTeleported, collidesAt, copy, copy, createSnapshot, customName, customName, eject, equals, fromMobSpawner, getAsString, getBoundingBox, getChunk, getCustomName, getEffectivePermissions, getEntityId, getEntityProperty, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, 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, isTicking, isUnderWater, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, name, nextComponentMessage, playEffect, recalculatePermissions, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvisible, setInvulnerable, setLastDamageCause, setLocation, setMetadata, setName, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setRotation, setSilent, setSpawnReason, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, teamDisplayName, teleport, teleport, teleport, teleportWithoutEvent, 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, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, 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, 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, remove, 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, canUseEquipmentSlot, clearActiveItem, clearActivePotionEffects, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, 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, 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, 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, lookAt, openSign, sendMessage, sendMessage, sendMessage, sendSignChange, sendSignChange, sendSignChange, setResourcePack, setRotation, showElderGuardianMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.projectiles.ProjectileSource
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 org.bukkit.inventory.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
public void simulateConsumeItem(@NotNull @NotNull org.bukkit.inventory.ItemStack consumable) 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
public void assertItemConsumed(@NotNull @NotNull org.bukkit.inventory.ItemStack consumable) Asserts a Player has consumed the given Item- Parameters:
consumable- The Item to asserts has been consumed
-
getType
@NotNull public @NotNull org.bukkit.entity.EntityType getType()- Specified by:
getTypein interfaceorg.bukkit.entity.Entity- Overrides:
getTypein classEntityMock
-
simulateBlockDamagePure
@NotNull protected @NotNull org.bukkit.event.block.BlockDamageEvent simulateBlockDamagePure(@NotNull @NotNull org.bukkit.block.Block block) Simulates the player damaging a block just likesimulateBlockDamage(Block). However, ifInstaBreakis enabled, it will not automatically fire aBlockBreakEvent. It will also still fire aBlockDamageEventeven if the player is not in survival mode.- Parameters:
block- The block to damage.- Returns:
- The event that has been fired.
-
simulateBlockDamage
@Nullable public @Nullable org.bukkit.event.block.BlockDamageEvent simulateBlockDamage(@NotNull @NotNull org.bukkit.block.Block block) Simulates the player damaging a block. Note that this method does not 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.
-
simulateBlockBreak
@Nullable public @Nullable org.bukkit.event.block.BlockBreakEvent simulateBlockBreak(@NotNull @NotNull org.bukkit.block.Block block) 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.
-
simulateBlockPlace
@Nullable public @Nullable org.bukkit.event.block.BlockPlaceEvent simulateBlockPlace(@NotNull @NotNull org.bukkit.Material material, @NotNull @NotNull org.bukkit.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
@NotNull public @NotNull org.bukkit.event.inventory.InventoryClickEvent simulateInventoryClick(int slot) 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 org.bukkit.event.inventory.InventoryClickEvent simulateInventoryClick(@NotNull @NotNull org.bukkit.inventory.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 org.bukkit.event.inventory.InventoryClickEvent simulateInventoryClick(@NotNull @NotNull org.bukkit.inventory.InventoryView inventoryView, @NotNull @NotNull org.bukkit.event.inventory.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 org.bukkit.event.player.PlayerMoveEvent simulatePlayerMove(@NotNull @NotNull org.bukkit.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
public void setGameMode(@NotNull @NotNull org.bukkit.GameMode mode) - Specified by:
setGameModein interfaceorg.bukkit.entity.HumanEntity- Overrides:
setGameModein classHumanEntityMock
-
isWhitelisted
public boolean isWhitelisted()- Specified by:
isWhitelistedin interfaceorg.bukkit.OfflinePlayer
-
setWhitelisted
public void setWhitelisted(boolean value) - Specified by:
setWhitelistedin interfaceorg.bukkit.OfflinePlayer
-
getPlayer
public org.bukkit.entity.Player getPlayer()- Specified by:
getPlayerin interfaceorg.bukkit.OfflinePlayer
-
isOnline
public boolean isOnline()- Specified by:
isOnlinein interfaceorg.bukkit.OfflinePlayer
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceorg.bukkit.OfflinePlayer
-
isBanned
public boolean isBanned()- Specified by:
isBannedin interfaceorg.bukkit.OfflinePlayer
-
ban
@Nullable public <E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Instant expires, @Nullable @Nullable String source) - Specified by:
banin interfaceorg.bukkit.OfflinePlayer
-
ban
@Nullable public <E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Duration duration, @Nullable @Nullable String source) - Specified by:
banin interfaceorg.bukkit.OfflinePlayer
-
ban
@Nullable public @Nullable org.bukkit.BanEntry<org.bukkit.profile.PlayerProfile> ban(@Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source) - Specified by:
banin interfaceorg.bukkit.OfflinePlayer
-
assertInventoryView
public void assertInventoryView(String message, org.bukkit.event.inventory.InventoryType type, @NotNull @NotNull Predicate<org.bukkit.inventory.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(org.bukkit.event.inventory.InventoryType type, @NotNull @NotNull Predicate<org.bukkit.inventory.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
public void assertInventoryView(org.bukkit.event.inventory.InventoryType type) 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 interfaceorg.bukkit.entity.Player
-
performCommand
- Specified by:
performCommandin interfaceorg.bukkit.entity.Player
-
showDemoScreen
public void showDemoScreen()- Specified by:
showDemoScreenin interfaceorg.bukkit.entity.Player
-
isAllowingServerListings
public boolean isAllowingServerListings()- Specified by:
isAllowingServerListingsin interfaceorg.bukkit.entity.Player
-
getEyeHeight
public double getEyeHeight()- Specified by:
getEyeHeightin interfaceorg.bukkit.entity.LivingEntity- Overrides:
getEyeHeightin classLivingEntityMock
-
getEyeHeight
public double getEyeHeight(boolean ignorePose) - Specified by:
getEyeHeightin interfaceorg.bukkit.entity.LivingEntity- Overrides:
getEyeHeightin classLivingEntityMock
-
getNoDamageTicks
public int getNoDamageTicks()- Specified by:
getNoDamageTicksin interfaceorg.bukkit.entity.LivingEntity- Overrides:
getNoDamageTicksin classLivingEntityMock
-
setNoDamageTicks
public void setNoDamageTicks(int ticks) - Specified by:
setNoDamageTicksin interfaceorg.bukkit.entity.LivingEntity- Overrides:
setNoDamageTicksin classLivingEntityMock
-
getEquipment
public org.bukkit.inventory.EntityEquipment getEquipment()- Specified by:
getEquipmentin interfaceorg.bukkit.entity.HumanEntity- Specified by:
getEquipmentin interfaceorg.bukkit.entity.LivingEntity- Overrides:
getEquipmentin classLivingEntityMock
-
isConversing
public boolean isConversing()- Specified by:
isConversingin interfaceorg.bukkit.conversations.Conversable
-
acceptConversationInput
- Specified by:
acceptConversationInputin interfaceorg.bukkit.conversations.Conversable
-
beginConversation
public boolean beginConversation(@NotNull @NotNull org.bukkit.conversations.Conversation conversation) - Specified by:
beginConversationin interfaceorg.bukkit.conversations.Conversable
-
abandonConversation
public void abandonConversation(@NotNull @NotNull org.bukkit.conversations.Conversation conversation) - Specified by:
abandonConversationin interfaceorg.bukkit.conversations.Conversable
-
abandonConversation
public void abandonConversation(@NotNull @NotNull org.bukkit.conversations.Conversation conversation, @NotNull @NotNull org.bukkit.conversations.ConversationAbandonedEvent details) - Specified by:
abandonConversationin interfaceorg.bukkit.conversations.Conversable
-
getFirstPlayed
public long getFirstPlayed()- Specified by:
getFirstPlayedin interfaceorg.bukkit.OfflinePlayer
-
getLastPlayed
Deprecated.- Specified by:
getLastPlayedin interfaceorg.bukkit.OfflinePlayer
-
hasPlayedBefore
public boolean hasPlayedBefore()- Specified by:
hasPlayedBeforein interfaceorg.bukkit.OfflinePlayer
-
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 interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
-
sendPluginMessage
public void sendPluginMessage(@NotNull @NotNull org.bukkit.plugin.Plugin source, @NotNull @NotNull String channel, byte[] message) - Specified by:
sendPluginMessagein interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
getListeningPluginChannels
- Specified by:
getListeningPluginChannelsin interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
displayName
@NotNull public @NotNull net.kyori.adventure.text.Component displayName()- Specified by:
displayNamein interfaceorg.bukkit.entity.Player
-
displayName
public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component displayName) - Specified by:
displayNamein interfaceorg.bukkit.entity.Player
-
getDisplayName
Deprecated.- Specified by:
getDisplayNamein interfaceorg.bukkit.entity.Player
-
setDisplayName
Deprecated.- Specified by:
setDisplayNamein interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
playerListName
@NotNull public @NotNull net.kyori.adventure.text.Component playerListName()- Specified by:
playerListNamein interfaceorg.bukkit.entity.Player
-
playerListHeader
@Nullable public @Nullable net.kyori.adventure.text.Component playerListHeader()- Specified by:
playerListHeaderin interfaceorg.bukkit.entity.Player
-
getPlayerListName
Deprecated.- Specified by:
getPlayerListNamein interfaceorg.bukkit.entity.Player
-
setPlayerListName
Deprecated.- Specified by:
setPlayerListNamein interfaceorg.bukkit.entity.Player
-
setCompassTarget
public void setCompassTarget(@NotNull @NotNull org.bukkit.Location loc) - Specified by:
setCompassTargetin interfaceorg.bukkit.entity.Player
-
getCompassTarget
@NotNull public @NotNull org.bukkit.Location getCompassTarget()- Specified by:
getCompassTargetin interfaceorg.bukkit.entity.Player
-
setAddress
Sets theInetSocketAddressreturned bygetAddress().- Parameters:
address- The address to set.
-
getAddress
- Specified by:
getAddressin interfacecom.destroystokyo.paper.network.NetworkClient- Specified by:
getAddressin interfaceorg.bukkit.entity.Player
-
getHAProxyAddress
- Specified by:
getHAProxyAddressin interfaceorg.bukkit.entity.Player
-
isTransferred
public boolean isTransferred()- Specified by:
isTransferredin interfaceorg.bukkit.entity.Player
-
transfer
- Specified by:
transferin interfaceorg.bukkit.entity.Player
-
retrieveCookie
@Experimental @NotNull public @NotNull CompletableFuture<byte[]> retrieveCookie(@NotNull @NotNull org.bukkit.NamespacedKey key) - Specified by:
retrieveCookiein interfaceorg.bukkit.entity.Player
-
storeCookie
@Experimental public void storeCookie(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull @org.jetbrains.annotations.NotNull byte[] value) - Specified by:
storeCookiein interfaceorg.bukkit.entity.Player
-
getProtocolVersion
public int getProtocolVersion()- Specified by:
getProtocolVersionin interfacecom.destroystokyo.paper.network.NetworkClient
-
getVirtualHost
- Specified by:
getVirtualHostin interfacecom.destroystokyo.paper.network.NetworkClient
-
sendRawMessage
- Specified by:
sendRawMessagein interfaceorg.bukkit.conversations.Conversable- Specified by:
sendRawMessagein interfaceorg.bukkit.entity.Player
-
sendRawMessage
- Specified by:
sendRawMessagein interfaceorg.bukkit.conversations.Conversable
-
kickPlayer
Deprecated.- Specified by:
kickPlayerin interfaceorg.bukkit.entity.Player
-
kick
public void kick()- Specified by:
kickin interfaceorg.bukkit.entity.Player
-
kick
public void kick(@Nullable @Nullable net.kyori.adventure.text.Component message) - Specified by:
kickin interfaceorg.bukkit.entity.Player
-
kick
public void kick(@Nullable @Nullable net.kyori.adventure.text.Component message, @NotNull org.bukkit.event.player.PlayerKickEvent.Cause cause) - Specified by:
kickin interfaceorg.bukkit.entity.Player
-
chat
- Specified by:
chatin interfaceorg.bukkit.entity.Player
-
ban
@Nullable public <E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Instant expires, @Nullable @Nullable String source, boolean kickPlayer) - Specified by:
banin interfaceorg.bukkit.entity.Player
-
ban
@Nullable public <E extends org.bukkit.BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable @Nullable String reason, @Nullable @Nullable Duration duration, @Nullable @Nullable String source, boolean kickPlayer) - Specified by:
banin interfaceorg.bukkit.entity.Player
-
ban
@Nullable public @Nullable org.bukkit.BanEntry<org.bukkit.profile.PlayerProfile> ban(@Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source, boolean kickPlayer) - Specified by:
banin interfaceorg.bukkit.entity.Player
-
banIp
@Nullable public @Nullable org.bukkit.BanEntry<InetAddress> banIp(@Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source, boolean kickPlayer) - Specified by:
banIpin interfaceorg.bukkit.entity.Player
-
banIp
@Nullable public @Nullable org.bukkit.BanEntry<InetAddress> banIp(@Nullable @Nullable String reason, @Nullable @Nullable Instant expires, @Nullable @Nullable String source, boolean kickPlayer) - Specified by:
banIpin interfaceorg.bukkit.entity.Player
-
banIp
@Nullable public @Nullable org.bukkit.BanEntry<InetAddress> banIp(@Nullable @Nullable String reason, @Nullable @Nullable Duration duration, @Nullable @Nullable String source, boolean kickPlayer) - Specified by:
banIpin interfaceorg.bukkit.entity.Player
-
isSneaking
public boolean isSneaking()- Specified by:
isSneakingin interfaceorg.bukkit.entity.Entity- Specified by:
isSneakingin interfaceorg.bukkit.entity.Player- Overrides:
isSneakingin classEntityMock
-
setSneaking
public void setSneaking(boolean sneaking) - Specified by:
setSneakingin interfaceorg.bukkit.entity.Entity- Specified by:
setSneakingin interfaceorg.bukkit.entity.Player- Overrides:
setSneakingin classEntityMock
-
simulateSneak
@NotNull public @NotNull org.bukkit.event.player.PlayerToggleSneakEvent simulateSneak(boolean sneak) Simulates sneaking.- Parameters:
sneak- Whether the player is beginning to sneak.- Returns:
- The event.
-
isSprinting
public boolean isSprinting()- Specified by:
isSprintingin interfaceorg.bukkit.entity.Player
-
setSprinting
public void setSprinting(boolean sprinting) - Specified by:
setSprintingin interfaceorg.bukkit.entity.Player
-
simulateSprint
@NotNull public @NotNull org.bukkit.event.player.PlayerToggleSprintEvent simulateSprint(boolean sprint) Simulates sprinting.- Parameters:
sprint- Whether the player is beginning to sprint.- Returns:
- The event.
-
saveData
public void saveData()- Specified by:
saveDatain interfaceorg.bukkit.entity.Player
-
loadData
public void loadData()- Specified by:
loadDatain interfaceorg.bukkit.entity.Player
-
isSleepingIgnored
public boolean isSleepingIgnored()- Specified by:
isSleepingIgnoredin interfaceorg.bukkit.entity.Player
-
setSleepingIgnored
public void setSleepingIgnored(boolean isSleeping) - Specified by:
setSleepingIgnoredin interfaceorg.bukkit.entity.Player
-
playNote
@Deprecated public void playNote(@NotNull @NotNull org.bukkit.Location loc, byte instrument, byte note) Deprecated.- Specified by:
playNotein interfaceorg.bukkit.entity.Player
-
playNote
public void playNote(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.Instrument instrument, @NotNull @NotNull org.bukkit.Note note) - Specified by:
playNotein interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull String sound, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.Sound sound, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Sound sound, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull String sound, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull String sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull String sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Sound sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull String sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.Sound sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch, long seed) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.Sound sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Sound sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
hasFlyingFallDamage
@NotNull public @NotNull net.kyori.adventure.util.TriState hasFlyingFallDamage()- Specified by:
hasFlyingFallDamagein interfaceorg.bukkit.entity.Player
-
setFlyingFallDamage
public void setFlyingFallDamage(@NotNull @NotNull net.kyori.adventure.util.TriState flyingFallDamage) - Specified by:
setFlyingFallDamagein interfaceorg.bukkit.entity.Player
-
setHasSeenWinScreen
public void setHasSeenWinScreen(boolean hasSeenWinScreen) - Specified by:
setHasSeenWinScreenin interfaceorg.bukkit.entity.Player
-
hasSeenWinScreen
public boolean hasSeenWinScreen()- Specified by:
hasSeenWinScreenin interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull String sound, @NotNull @NotNull org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.entity.Player
-
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
public void stopSound(@NotNull @NotNull org.bukkit.Sound sound) - Specified by:
stopSoundin interfaceorg.bukkit.entity.Player
-
stopSound
- Specified by:
stopSoundin interfaceorg.bukkit.entity.Player
-
stopSound
public void stopSound(@NotNull @NotNull org.bukkit.Sound sound, @Nullable @Nullable org.bukkit.SoundCategory category) - Specified by:
stopSoundin interfaceorg.bukkit.entity.Player
-
stopSound
public void stopSound(@NotNull @NotNull String sound, @Nullable @Nullable org.bukkit.SoundCategory category) - Specified by:
stopSoundin interfaceorg.bukkit.entity.Player
-
stopSound
public void stopSound(@NotNull @NotNull org.bukkit.SoundCategory category) - Specified by:
stopSoundin interfaceorg.bukkit.entity.Player
-
stopAllSounds
public void stopAllSounds()- Specified by:
stopAllSoundsin interfaceorg.bukkit.entity.Player
-
playEffect
@Deprecated public void playEffect(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.Effect effect, int data) Deprecated.- Specified by:
playEffectin interfaceorg.bukkit.entity.Player
-
playEffect
public <T> void playEffect(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.Effect effect, @Nullable T data) - Specified by:
playEffectin interfaceorg.bukkit.entity.Player
-
breakBlock
public boolean breakBlock(@NotNull @NotNull org.bukkit.block.Block block) - Specified by:
breakBlockin interfaceorg.bukkit.entity.Player
-
sendBlockChange
@Deprecated public void sendBlockChange(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.Material material, byte data) Deprecated.- Specified by:
sendBlockChangein interfaceorg.bukkit.entity.Player
-
sendBlockChange
public void sendBlockChange(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.block.data.BlockData block) - Specified by:
sendBlockChangein interfaceorg.bukkit.entity.Player
-
sendBlockChanges
- Specified by:
sendBlockChangesin interfaceorg.bukkit.entity.Player
-
sendBlockChanges
public void sendBlockChanges(@NotNull @NotNull Collection<org.bukkit.block.BlockState> blocks, boolean suppressLightUpdates) - Specified by:
sendBlockChangesin interfaceorg.bukkit.entity.Player
-
sendSignChange
public void sendSignChange(@NotNull @NotNull org.bukkit.Location loc, @Nullable @Nullable List<? extends net.kyori.adventure.text.Component> lines, @NotNull @NotNull org.bukkit.DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException - Specified by:
sendSignChangein interfaceorg.bukkit.entity.Player- Throws:
IllegalArgumentException
-
sendSignChange
Deprecated.- Specified by:
sendSignChangein interfaceorg.bukkit.entity.Player
-
sendSignChange
public void sendSignChange(@NotNull @NotNull org.bukkit.Location loc, String[] lines, @NotNull @NotNull org.bukkit.DyeColor dyeColor) throws IllegalArgumentException - Specified by:
sendSignChangein interfaceorg.bukkit.entity.Player- Throws:
IllegalArgumentException
-
sendSignChange
public void sendSignChange(@NotNull @NotNull org.bukkit.Location loc, @Nullable @Nullable String @Nullable [] lines, @NotNull @NotNull org.bukkit.DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException - Specified by:
sendSignChangein interfaceorg.bukkit.entity.Player- Throws:
IllegalArgumentException
-
sendBlockUpdate
public void sendBlockUpdate(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.block.TileState tileState) throws IllegalArgumentException - Specified by:
sendBlockUpdatein interfaceorg.bukkit.entity.Player- Throws:
IllegalArgumentException
-
sendPotionEffectChange
public void sendPotionEffectChange(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull org.bukkit.potion.PotionEffect effect) - Specified by:
sendPotionEffectChangein interfaceorg.bukkit.entity.Player
-
sendPotionEffectChangeRemove
public void sendPotionEffectChangeRemove(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull org.bukkit.potion.PotionEffectType type) - Specified by:
sendPotionEffectChangeRemovein interfaceorg.bukkit.entity.Player
-
sendMap
public void sendMap(@NotNull @NotNull org.bukkit.map.MapView map) - Specified by:
sendMapin interfaceorg.bukkit.entity.Player
-
showWinScreen
public void showWinScreen()- Specified by:
showWinScreenin interfaceorg.bukkit.entity.Player
-
sendActionBar
Deprecated.- Specified by:
sendActionBarin interfaceorg.bukkit.entity.Player
-
sendActionBar
Deprecated.- Specified by:
sendActionBarin interfaceorg.bukkit.entity.Player
-
sendActionBar
@Deprecated public void sendActionBar(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent... message) Deprecated.- Specified by:
sendActionBarin interfaceorg.bukkit.entity.Player
-
setTitleTimes
Deprecated.- Specified by:
setTitleTimesin interfaceorg.bukkit.entity.Player
-
setSubtitle
Deprecated.- Specified by:
setSubtitlein interfaceorg.bukkit.entity.Player
-
setSubtitle
Deprecated.- Specified by:
setSubtitlein interfaceorg.bukkit.entity.Player
-
showTitle
@Deprecated public void showTitle(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] title) Deprecated.- Specified by:
showTitlein interfaceorg.bukkit.entity.Player
-
showTitle
Deprecated.- Specified by:
showTitlein interfaceorg.bukkit.entity.Player
-
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.- Specified by:
showTitlein interfaceorg.bukkit.entity.Player
-
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.- Specified by:
showTitlein interfaceorg.bukkit.entity.Player
-
sendTitle
Deprecated.- Specified by:
sendTitlein interfaceorg.bukkit.entity.Player
-
updateTitle
Deprecated.- Specified by:
updateTitlein interfaceorg.bukkit.entity.Player
-
hideTitle
Deprecated.- Specified by:
hideTitlein interfaceorg.bukkit.entity.Player
-
getPreviousGameMode
@Nullable public @Nullable org.bukkit.GameMode getPreviousGameMode()- Specified by:
getPreviousGameModein interfaceorg.bukkit.entity.Player
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic) - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int amount) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int amount) - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
setStatistic
public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int newValue) - Specified by:
setStatisticin interfaceorg.bukkit.OfflinePlayer
-
getStatistic
public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic) - Specified by:
getStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material) - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
getStatistic
public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material) - Specified by:
getStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int amount) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int amount) - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
setStatistic
public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int newValue) - Specified by:
setStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType) - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
getStatistic
public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType) - Specified by:
getStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int amount) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
decrementStatistic
public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int amount) - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
setStatistic
public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int newValue) - Specified by:
setStatisticin interfaceorg.bukkit.OfflinePlayer
-
setPlayerTime
public void setPlayerTime(long time, boolean relative) - Specified by:
setPlayerTimein interfaceorg.bukkit.entity.Player
-
getPlayerTime
public long getPlayerTime()- Specified by:
getPlayerTimein interfaceorg.bukkit.entity.Player
-
getPlayerTimeOffset
public long getPlayerTimeOffset()- Specified by:
getPlayerTimeOffsetin interfaceorg.bukkit.entity.Player
-
isPlayerTimeRelative
public boolean isPlayerTimeRelative()- Specified by:
isPlayerTimeRelativein interfaceorg.bukkit.entity.Player
-
resetPlayerTime
public void resetPlayerTime()- Specified by:
resetPlayerTimein interfaceorg.bukkit.entity.Player
-
getPlayerWeather
public org.bukkit.WeatherType getPlayerWeather()- Specified by:
getPlayerWeatherin interfaceorg.bukkit.entity.Player
-
setPlayerWeather
public void setPlayerWeather(@NotNull @NotNull org.bukkit.WeatherType type) - Specified by:
setPlayerWeatherin interfaceorg.bukkit.entity.Player
-
resetPlayerWeather
public void resetPlayerWeather()- Specified by:
resetPlayerWeatherin interfaceorg.bukkit.entity.Player
-
giveExp
public void giveExp(int amount) - Specified by:
giveExpin interfaceorg.bukkit.entity.Player
-
getExpCooldown
public int getExpCooldown()- Specified by:
getExpCooldownin interfaceorg.bukkit.entity.Player
-
setExpCooldown
public void setExpCooldown(int ticks) - Specified by:
setExpCooldownin interfaceorg.bukkit.entity.Player
-
giveExp
public void giveExp(int amount, boolean applyMending) - Specified by:
giveExpin interfaceorg.bukkit.entity.Player
-
applyMending
public int applyMending(int amount) - Specified by:
applyMendingin interfaceorg.bukkit.entity.Player
-
giveExpLevels
public void giveExpLevels(int amount) - Specified by:
giveExpLevelsin interfaceorg.bukkit.entity.Player
-
getExp
public float getExp()- Specified by:
getExpin interfaceorg.bukkit.entity.Player
-
setExp
public void setExp(float exp) - Specified by:
setExpin interfaceorg.bukkit.entity.Player
-
getLevel
public int getLevel()- Specified by:
getLevelin interfaceorg.bukkit.entity.Player
-
setLevel
public void setLevel(int level) - Specified by:
setLevelin interfaceorg.bukkit.entity.Player
-
getTotalExperience
public int getTotalExperience()- Specified by:
getTotalExperiencein interfaceorg.bukkit.entity.Player
-
setTotalExperience
public void setTotalExperience(int exp) - Specified by:
setTotalExperiencein interfaceorg.bukkit.entity.Player
-
calculateTotalExperiencePoints
public @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int calculateTotalExperiencePoints()- Specified by:
calculateTotalExperiencePointsin interfaceorg.bukkit.entity.Player
-
setExperienceLevelAndProgress
public void setExperienceLevelAndProgress(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int totalExperience) - Specified by:
setExperienceLevelAndProgressin interfaceorg.bukkit.entity.Player
-
getExperiencePointsNeededForNextLevel
public int getExperiencePointsNeededForNextLevel()- Specified by:
getExperiencePointsNeededForNextLevelin interfaceorg.bukkit.entity.Player
-
getRespawnLocation
@Nullable public @Nullable org.bukkit.Location getRespawnLocation()- Specified by:
getRespawnLocationin interfaceorg.bukkit.OfflinePlayer- Specified by:
getRespawnLocationin interfaceorg.bukkit.entity.Player
-
getBedSpawnLocation
@Nullable public @Nullable org.bukkit.Location getBedSpawnLocation()- Specified by:
getBedSpawnLocationin interfaceorg.bukkit.OfflinePlayer- Specified by:
getBedSpawnLocationin interfaceorg.bukkit.entity.Player
-
getLastLogin
public long getLastLogin()- Specified by:
getLastLoginin interfaceorg.bukkit.OfflinePlayer
-
getLastSeen
public long getLastSeen()- Specified by:
getLastSeenin interfaceorg.bukkit.OfflinePlayer
-
setRespawnLocation
public void setRespawnLocation(@Nullable @Nullable org.bukkit.Location loc) - Specified by:
setRespawnLocationin interfaceorg.bukkit.entity.Player
-
setBedSpawnLocation
public void setBedSpawnLocation(@Nullable @Nullable org.bukkit.Location loc) - Specified by:
setBedSpawnLocationin interfaceorg.bukkit.entity.Player
-
setBedSpawnLocation
public void setBedSpawnLocation(@Nullable @Nullable org.bukkit.Location loc, boolean override) - Specified by:
setBedSpawnLocationin interfaceorg.bukkit.entity.Player
-
setRespawnLocation
public void setRespawnLocation(@Nullable @Nullable org.bukkit.Location loc, boolean override) - Specified by:
setRespawnLocationin interfaceorg.bukkit.entity.Player
-
getAllowFlight
public boolean getAllowFlight()- Specified by:
getAllowFlightin interfaceorg.bukkit.entity.Player
-
setAllowFlight
public void setAllowFlight(boolean flight) - Specified by:
setAllowFlightin interfaceorg.bukkit.entity.Player
-
hidePlayer
Deprecated.- Specified by:
hidePlayerin interfaceorg.bukkit.entity.Player
-
hidePlayer
public void hidePlayer(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
hidePlayerin interfaceorg.bukkit.entity.Player
-
showPlayer
Deprecated.- Specified by:
showPlayerin interfaceorg.bukkit.entity.Player
-
showPlayer
public void showPlayer(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
showPlayerin interfaceorg.bukkit.entity.Player
-
canSee
public boolean canSee(@NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
canSeein interfaceorg.bukkit.entity.Player
-
hideEntity
@Experimental public void hideEntity(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Entity entity) - Specified by:
hideEntityin interfaceorg.bukkit.entity.Player
-
showEntity
@Experimental public void showEntity(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Entity entity) - Specified by:
showEntityin interfaceorg.bukkit.entity.Player
-
canSee
public boolean canSee(@NotNull @NotNull org.bukkit.entity.Entity entity) - Specified by:
canSeein interfaceorg.bukkit.entity.Player
-
isListed
public boolean isListed(@NotNull @NotNull org.bukkit.entity.Player other) - Specified by:
isListedin interfaceorg.bukkit.entity.Player
-
unlistPlayer
public boolean unlistPlayer(@NotNull @NotNull org.bukkit.entity.Player other) - Specified by:
unlistPlayerin interfaceorg.bukkit.entity.Player
-
listPlayer
public boolean listPlayer(@NotNull @NotNull org.bukkit.entity.Player other) - Specified by:
listPlayerin interfaceorg.bukkit.entity.Player
-
isFlying
public boolean isFlying()- Specified by:
isFlyingin interfaceorg.bukkit.entity.Player
-
setFlying
public void setFlying(boolean value) - Specified by:
setFlyingin interfaceorg.bukkit.entity.Player
-
simulateToggleFlight
@NotNull public @NotNull org.bukkit.event.player.PlayerToggleFlightEvent simulateToggleFlight(boolean fly) Simulates toggling flight.- Parameters:
fly- Whether the player is starting to fly.- Returns:
- The event.
-
getFlySpeed
public float getFlySpeed()- Specified by:
getFlySpeedin interfaceorg.bukkit.entity.Player
-
setFlySpeed
public void setFlySpeed(float value) - Specified by:
setFlySpeedin interfaceorg.bukkit.entity.Player
-
getWalkSpeed
public float getWalkSpeed()- Specified by:
getWalkSpeedin interfaceorg.bukkit.entity.Player
-
setWalkSpeed
public void setWalkSpeed(float value) - Specified by:
setWalkSpeedin interfaceorg.bukkit.entity.Player
-
setTexturePack
Deprecated.- Specified by:
setTexturePackin interfaceorg.bukkit.entity.Player
-
setResourcePack
Deprecated.- Specified by:
setResourcePackin interfaceorg.bukkit.entity.Player
-
setResourcePack
- Specified by:
setResourcePackin interfaceorg.bukkit.entity.Player
-
setResourcePack
@Deprecated public void setResourcePack(@NotNull @NotNull String url, @Nullable @org.jetbrains.annotations.Nullable byte[] hash, @Nullable @Nullable String prompt) Deprecated.- Specified by:
setResourcePackin interfaceorg.bukkit.entity.Player
-
setResourcePack
- Specified by:
setResourcePackin interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
setResourcePack
public void setResourcePack(@NotNull @NotNull String url, byte @Nullable [] hash, @Nullable @Nullable net.kyori.adventure.text.Component prompt, boolean force) - Specified by:
setResourcePackin interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
getScoreboard
@NotNull public @NotNull org.bukkit.scoreboard.Scoreboard getScoreboard()- Specified by:
getScoreboardin interfaceorg.bukkit.entity.Player
-
setScoreboard
public void setScoreboard(@NotNull @NotNull org.bukkit.scoreboard.Scoreboard scoreboard) - Specified by:
setScoreboardin interfaceorg.bukkit.entity.Player
-
getWorldBorder
@Nullable public @Nullable org.bukkit.WorldBorder getWorldBorder()- Specified by:
getWorldBorderin interfaceorg.bukkit.entity.Player
-
setWorldBorder
public void setWorldBorder(@Nullable @Nullable org.bukkit.WorldBorder border) - Specified by:
setWorldBorderin interfaceorg.bukkit.entity.Player
-
setHealth
public void setHealth(double health) - Specified by:
setHealthin interfaceorg.bukkit.entity.Damageable- Overrides:
setHealthin classLivingEntityMock
-
isHealthScaled
public boolean isHealthScaled()- Specified by:
isHealthScaledin interfaceorg.bukkit.entity.Player
-
setHealthScaled
public void setHealthScaled(boolean scale) - Specified by:
setHealthScaledin interfaceorg.bukkit.entity.Player
-
getHealthScale
public double getHealthScale()- Specified by:
getHealthScalein interfaceorg.bukkit.entity.Player
-
setHealthScale
public void setHealthScale(double scale) - Specified by:
setHealthScalein interfaceorg.bukkit.entity.Player
-
sendHealthUpdate
public void sendHealthUpdate(double health, int foodLevel, float saturationLevel) - Specified by:
sendHealthUpdatein interfaceorg.bukkit.entity.Player
-
sendHealthUpdate
public void sendHealthUpdate()- Specified by:
sendHealthUpdatein interfaceorg.bukkit.entity.Player
-
getSpectatorTarget
public org.bukkit.entity.Entity getSpectatorTarget()- Specified by:
getSpectatorTargetin interfaceorg.bukkit.entity.Player
-
setSpectatorTarget
public void setSpectatorTarget(org.bukkit.entity.Entity entity) - Specified by:
setSpectatorTargetin interfaceorg.bukkit.entity.Player
-
sendTitle
Deprecated.- Specified by:
sendTitlein interfaceorg.bukkit.entity.Player
-
sendTitle
Deprecated.- Specified by:
sendTitlein interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double x, double y, double z, int count) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double x, double y, double z, int count, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force) - Specified by:
spawnParticlein interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.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 interfaceorg.bukkit.entity.Player
-
getAdvancementProgress
@NotNull public @NotNull org.bukkit.advancement.AdvancementProgress getAdvancementProgress(@NotNull @NotNull org.bukkit.advancement.Advancement advancement) - Specified by:
getAdvancementProgressin interfaceorg.bukkit.entity.Player
-
getLocale
- Specified by:
getLocalein interfaceorg.bukkit.entity.Player
-
getAffectsSpawning
public boolean getAffectsSpawning()- Specified by:
getAffectsSpawningin interfaceorg.bukkit.entity.Player
-
setAffectsSpawning
public void setAffectsSpawning(boolean affects) - Specified by:
setAffectsSpawningin interfaceorg.bukkit.entity.Player
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistancein interfaceorg.bukkit.entity.Player
-
setViewDistance
public void setViewDistance(int viewDistance) - Specified by:
setViewDistancein interfaceorg.bukkit.entity.Player
-
getSimulationDistance
public int getSimulationDistance()- Specified by:
getSimulationDistancein interfaceorg.bukkit.entity.Player
-
setSimulationDistance
public void setSimulationDistance(int simulationDistance) - Specified by:
setSimulationDistancein interfaceorg.bukkit.entity.Player
-
getNoTickViewDistance
Deprecated.- Specified by:
getNoTickViewDistancein interfaceorg.bukkit.entity.Player
-
setNoTickViewDistance
Deprecated.- Specified by:
setNoTickViewDistancein interfaceorg.bukkit.entity.Player
-
getSendViewDistance
public int getSendViewDistance()- Specified by:
getSendViewDistancein interfaceorg.bukkit.entity.Player
-
setSendViewDistance
public void setSendViewDistance(int viewDistance) - Specified by:
setSendViewDistancein interfaceorg.bukkit.entity.Player
-
getPlayerListHeader
- Specified by:
getPlayerListHeaderin interfaceorg.bukkit.entity.Player
-
setPlayerListHeader
- Specified by:
setPlayerListHeaderin interfaceorg.bukkit.entity.Player
-
updateCommands
public void updateCommands()- Specified by:
updateCommandsin interfaceorg.bukkit.entity.Player
-
getClientViewDistance
public int getClientViewDistance()- Specified by:
getClientViewDistancein interfaceorg.bukkit.entity.Player
-
locale
- Specified by:
localein interfaceorg.bukkit.entity.Player
-
openBook
public void openBook(@NotNull @NotNull org.bukkit.inventory.ItemStack book) - Specified by:
openBookin interfaceorg.bukkit.entity.Player
-
openSign
public void openSign(@NotNull @NotNull org.bukkit.block.Sign sign, @NotNull @NotNull org.bukkit.block.sign.Side side) - Specified by:
openSignin interfaceorg.bukkit.entity.HumanEntity- Specified by:
openSignin interfaceorg.bukkit.entity.Player
-
setResourcePack
- Specified by:
setResourcePackin interfaceorg.bukkit.entity.Player
-
setResourcePack
public void setResourcePack(@NotNull @NotNull String url, @NotNull @NotNull String hash, boolean required) - Specified by:
setResourcePackin interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
getResourcePackStatus
public @Nullable org.bukkit.event.player.PlayerResourcePackStatusEvent.Status getResourcePackStatus()- Specified by:
getResourcePackStatusin interfaceorg.bukkit.entity.Player
-
getResourcePackHash
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getResourcePackHashin interfaceorg.bukkit.entity.Player
-
hasResourcePack
public boolean hasResourcePack()- Specified by:
hasResourcePackin interfaceorg.bukkit.entity.Player
-
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 interfaceorg.bukkit.entity.Player
-
removeResourcePack
- Specified by:
removeResourcePackin interfaceorg.bukkit.entity.Player
-
removeResourcePacks
public void removeResourcePacks()- Specified by:
removeResourcePacksin interfaceorg.bukkit.entity.Player
-
getPlayerProfile
@NotNull public @NotNull com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile()- Specified by:
getPlayerProfilein interfaceorg.bukkit.OfflinePlayer- Specified by:
getPlayerProfilein interfaceorg.bukkit.entity.Player
-
setPlayerProfile
public void setPlayerProfile(@NotNull @NotNull com.destroystokyo.paper.profile.PlayerProfile profile) - Specified by:
setPlayerProfilein interfaceorg.bukkit.entity.Player
-
getCooldownPeriod
public float getCooldownPeriod()- Specified by:
getCooldownPeriodin interfaceorg.bukkit.entity.Player
-
getCooledAttackStrength
public float getCooledAttackStrength(float adjustTicks) - Specified by:
getCooledAttackStrengthin interfaceorg.bukkit.entity.Player
-
resetCooldown
public void resetCooldown()- Specified by:
resetCooldownin interfaceorg.bukkit.entity.Player
-
getClientOption
@NotNull public <T> T getClientOption(@NotNull @NotNull com.destroystokyo.paper.ClientOption<T> option) - Specified by:
getClientOptionin interfaceorg.bukkit.entity.Player
-
boostElytra
@Nullable public @Nullable org.bukkit.entity.Firework boostElytra(@NotNull @NotNull org.bukkit.inventory.ItemStack firework) - Specified by:
boostElytrain interfaceorg.bukkit.entity.Player
-
sendOpLevel
public void sendOpLevel(byte level) - Specified by:
sendOpLevelin interfaceorg.bukkit.entity.Player
-
addAdditionalChatCompletions
- Specified by:
addAdditionalChatCompletionsin interfaceorg.bukkit.entity.Player
-
removeAdditionalChatCompletions
- Specified by:
removeAdditionalChatCompletionsin interfaceorg.bukkit.entity.Player
-
getClientBrandName
- Specified by:
getClientBrandNamein interfaceorg.bukkit.entity.Player
-
addCustomChatCompletions
- Specified by:
addCustomChatCompletionsin interfaceorg.bukkit.entity.Player
-
removeCustomChatCompletions
- Specified by:
removeCustomChatCompletionsin interfaceorg.bukkit.entity.Player
-
setCustomChatCompletions
- Specified by:
setCustomChatCompletionsin interfaceorg.bukkit.entity.Player
-
lookAt
public void lookAt(double x, double y, double z, @NotNull @NotNull io.papermc.paper.entity.LookAnchor playerAnchor) - Specified by:
lookAtin interfaceorg.bukkit.entity.Player
-
lookAt
public void lookAt(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull @NotNull io.papermc.paper.entity.LookAnchor entityAnchor) - Specified by:
lookAtin interfaceorg.bukkit.entity.Player
-
showElderGuardian
public void showElderGuardian(boolean silent) - Specified by:
showElderGuardianin interfaceorg.bukkit.entity.Player
-
getWardenWarningCooldown
public int getWardenWarningCooldown()- Specified by:
getWardenWarningCooldownin interfaceorg.bukkit.entity.Player
-
setWardenWarningCooldown
public void setWardenWarningCooldown(int cooldown) - Specified by:
setWardenWarningCooldownin interfaceorg.bukkit.entity.Player
-
getWardenTimeSinceLastWarning
public int getWardenTimeSinceLastWarning()- Specified by:
getWardenTimeSinceLastWarningin interfaceorg.bukkit.entity.Player
-
setWardenTimeSinceLastWarning
public void setWardenTimeSinceLastWarning(int time) - Specified by:
setWardenTimeSinceLastWarningin interfaceorg.bukkit.entity.Player
-
getWardenWarningLevel
public int getWardenWarningLevel()- Specified by:
getWardenWarningLevelin interfaceorg.bukkit.entity.Player
-
setWardenWarningLevel
public void setWardenWarningLevel(int warningLevel) - Specified by:
setWardenWarningLevelin interfaceorg.bukkit.entity.Player
-
increaseWardenWarningLevel
public void increaseWardenWarningLevel()- Specified by:
increaseWardenWarningLevelin interfaceorg.bukkit.entity.Player
-
attack
public void attack(@NotNull @NotNull org.bukkit.entity.Entity target) - Specified by:
attackin interfaceorg.bukkit.entity.LivingEntity- Overrides:
attackin classLivingEntityMock
-
startUsingItem
public void startUsingItem(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot hand) - Specified by:
startUsingItemin interfaceorg.bukkit.entity.LivingEntity- Overrides:
startUsingItemin classLivingEntityMock
-
completeUsingActiveItem
public void completeUsingActiveItem()- Specified by:
completeUsingActiveItemin interfaceorg.bukkit.entity.LivingEntity- Overrides:
completeUsingActiveItemin classLivingEntityMock
-
getActiveItemRemainingTime
public int getActiveItemRemainingTime()- Specified by:
getActiveItemRemainingTimein interfaceorg.bukkit.entity.LivingEntity- Overrides:
getActiveItemRemainingTimein classLivingEntityMock
-
setActiveItemRemainingTime
public void setActiveItemRemainingTime(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int ticks) - Specified by:
setActiveItemRemainingTimein interfaceorg.bukkit.entity.LivingEntity- Overrides:
setActiveItemRemainingTimein classLivingEntityMock
-
hasActiveItem
public boolean hasActiveItem()- Specified by:
hasActiveItemin interfaceorg.bukkit.entity.LivingEntity- Overrides:
hasActiveItemin classLivingEntityMock
-
getActiveItemUsedTime
public int getActiveItemUsedTime()- Specified by:
getActiveItemUsedTimein interfaceorg.bukkit.entity.LivingEntity- Overrides:
getActiveItemUsedTimein classLivingEntityMock
-
getActiveItemHand
@NotNull public @NotNull org.bukkit.inventory.EquipmentSlot getActiveItemHand()- Specified by:
getActiveItemHandin interfaceorg.bukkit.entity.LivingEntity- Overrides:
getActiveItemHandin classLivingEntityMock
-
broadcastSlotBreak
public void broadcastSlotBreak(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot) - Specified by:
broadcastSlotBreakin interfaceorg.bukkit.entity.LivingEntity- Overrides:
broadcastSlotBreakin classLivingEntityMock
-
getIdleDuration
- Specified by:
getIdleDurationin interfaceorg.bukkit.entity.Player
-
resetIdleDuration
public void resetIdleDuration()- Specified by:
resetIdleDurationin interfaceorg.bukkit.entity.Player
-
getSentChunkKeys
- Specified by:
getSentChunkKeysin interfaceorg.bukkit.entity.Player
-
getSentChunks
- Specified by:
getSentChunksin interfaceorg.bukkit.entity.Player
-
isChunkSent
public boolean isChunkSent(long chunkKey) - Specified by:
isChunkSentin interfaceorg.bukkit.entity.Player
-
getTrackedBy
- Specified by:
getTrackedByin interfaceorg.bukkit.entity.Entity- Overrides:
getTrackedByin classEntityMock
-
launchProjectile
@NotNull public <T extends org.bukkit.entity.Projectile> T launchProjectile(@NotNull @NotNull Class<? extends T> projectile, @Nullable @Nullable org.bukkit.util.Vector velocity, @Nullable @Nullable Consumer<? super T> function) - Specified by:
launchProjectilein interfaceorg.bukkit.projectiles.ProjectileSource- Overrides:
launchProjectilein classLivingEntityMock
-
broadcastSlotBreak
public void broadcastSlotBreak(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot, @NotNull @NotNull Collection<org.bukkit.entity.Player> players) - Specified by:
broadcastSlotBreakin interfaceorg.bukkit.entity.LivingEntity- Overrides:
broadcastSlotBreakin classLivingEntityMock
-
damageItemStack
@NotNull public @NotNull org.bukkit.inventory.ItemStack damageItemStack(@NotNull @NotNull org.bukkit.inventory.ItemStack stack, int amount) - Specified by:
damageItemStackin interfaceorg.bukkit.entity.LivingEntity- Overrides:
damageItemStackin classLivingEntityMock
-
damageItemStack
public void damageItemStack(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot, int amount) - Specified by:
damageItemStackin interfaceorg.bukkit.entity.LivingEntity- Overrides:
damageItemStackin classLivingEntityMock
-
sendExperienceChange
public void sendExperienceChange(float progress) - Specified by:
sendExperienceChangein interfaceorg.bukkit.entity.Player
-
sendExperienceChange
public void sendExperienceChange(float progress, int level) - Specified by:
sendExperienceChangein interfaceorg.bukkit.entity.Player
-
sendBlockDamage
public void sendBlockDamage(@NotNull @NotNull org.bukkit.Location loc, float progress) - Specified by:
sendBlockDamagein interfaceorg.bukkit.entity.Player
-
sendMultiBlockChange
public void sendMultiBlockChange(@NotNull @NotNull Map<? extends io.papermc.paper.math.Position, org.bukkit.block.data.BlockData> blockChanges) - Specified by:
sendMultiBlockChangein interfaceorg.bukkit.entity.Player
-
sendBlockDamage
public void sendBlockDamage(@NotNull @NotNull org.bukkit.Location loc, float progress, int destroyerIdentity) - Specified by:
sendBlockDamagein interfaceorg.bukkit.entity.Player
-
sendHurtAnimation
public void sendHurtAnimation(float yaw) - Specified by:
sendHurtAnimationin interfaceorg.bukkit.entity.Player
-
sendMultiBlockChange
public void sendMultiBlockChange(@NotNull @NotNull Map<? extends io.papermc.paper.math.Position, org.bukkit.block.data.BlockData> blockChanges, boolean suppressLightUpdates) - Specified by:
sendMultiBlockChangein interfaceorg.bukkit.entity.Player
-
sendBlockDamage
public void sendBlockDamage(@NotNull @NotNull org.bukkit.Location loc, float progress, @NotNull @NotNull org.bukkit.entity.Entity source) - Specified by:
sendBlockDamagein interfaceorg.bukkit.entity.Player
-
getPing
public int getPing()- Specified by:
getPingin interfaceorg.bukkit.entity.Player
-
teleport
public boolean teleport(@NotNull @NotNull org.bukkit.Location location, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, io.papermc.paper.entity.TeleportFlag @NotNull ... flags) - Specified by:
teleportin interfaceorg.bukkit.entity.Entity- Overrides:
teleportin classEntityMock
-
teleportAsync
@NotNull public @NotNull CompletableFuture<Boolean> teleportAsync(@NotNull @NotNull org.bukkit.Location loc, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, @NotNull @NotNull io.papermc.paper.entity.TeleportFlag @NotNull ... teleportFlags) - Specified by:
teleportAsyncin interfaceorg.bukkit.entity.Entity- Overrides:
teleportAsyncin classEntityMock
-
sendEquipmentChange
public void sendEquipmentChange(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot, @NotNull @NotNull org.bukkit.inventory.ItemStack item) - Specified by:
sendEquipmentChangein interfaceorg.bukkit.entity.Player
-
sendEquipmentChange
public void sendEquipmentChange(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull Map<org.bukkit.inventory.EquipmentSlot, org.bukkit.inventory.ItemStack> equipmentChanges) - Specified by:
sendEquipmentChangein interfaceorg.bukkit.entity.Player
-
isOp
public boolean isOp()- Specified by:
isOpin interfaceorg.bukkit.permissions.ServerOperator- Overrides:
isOpin classEntityMock
-
setOp
public void setOp(boolean isOperator) - Specified by:
setOpin interfaceorg.bukkit.permissions.ServerOperator- Overrides:
setOpin classEntityMock
-
getEntityState
Description copied from class:EntityMockGet the current state of this entity- Overrides:
getEntityStatein classEntityMock- Returns:
- The current state of this entity
-
spigot
public @NotNull org.bukkit.entity.Player.Spigot spigot()- Specified by:
spigotin interfaceorg.bukkit.command.CommandSender- Specified by:
spigotin interfaceorg.bukkit.entity.Entity- Specified by:
spigotin interfaceorg.bukkit.entity.Player- Overrides:
spigotin classEntityMock
-
setLocale
Sets player locale- Parameters:
locale- the locale
-
MockPlayerList.