Class PlayerMock

java.lang.Object
org.bukkit.command.CommandSender.Spigot
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

public class PlayerMock extends HumanEntityMock implements org.bukkit.entity.Player, SoundReceiver
Mock implementation of a Player.
See Also:
  • Constructor Details

  • 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 consume
      alwaysInflictPotionEffect - 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:
      getType in interface org.bukkit.entity.Entity
      Overrides:
      getType in class EntityMock
    • simulateBlockDamagePure

      @NotNull protected @NotNull org.bukkit.event.block.BlockDamageEvent simulateBlockDamagePure(@NotNull @NotNull org.bukkit.block.Block block)
      Simulates the player damaging a block just like simulateBlockDamage(Block). However, if InstaBreak is enabled, it will not automatically fire a BlockBreakEvent. It will also still fire a BlockDamageEvent even 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. If InstaBreak is set to true by an event handler, a BlockBreakEvent is immediately fired. The result will then still be whether or not the BlockDamageEvent was cancelled or not, not the later BlockBreakEvent.
      Parameters:
      block - The block to damage.
      Returns:
      the event that was fired, null if 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, null if 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 to
      location - The location of the material to set to
      Returns:
      The event that was fired. null if 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 click
      slot - 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 click
      clickType - The click type we want to fire
      slot - The slot in the provided Inventory
      Returns:
      The event that was fired.
    • respawn

      public void respawn()
      This method simulates the Player respawning and also calls a PlayerRespawnEvent. Should the Player not be dead (when LivingEntityMock.isDead() returns false) then this will throw an UnsupportedOperationException. Otherwise, the Location will be set to Player.getBedSpawnLocation() or World.getSpawnLocation(). Lastly the health of this Player will 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:
      setGameMode in interface org.bukkit.entity.HumanEntity
      Overrides:
      setGameMode in class HumanEntityMock
    • isWhitelisted

      public boolean isWhitelisted()
      Specified by:
      isWhitelisted in interface org.bukkit.OfflinePlayer
    • setWhitelisted

      public void setWhitelisted(boolean value)
      Specified by:
      setWhitelisted in interface org.bukkit.OfflinePlayer
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Specified by:
      getPlayer in interface org.bukkit.OfflinePlayer
    • isOnline

      public boolean isOnline()
      Specified by:
      isOnline in interface org.bukkit.OfflinePlayer
    • isConnected

      public boolean isConnected()
      Specified by:
      isConnected in interface org.bukkit.OfflinePlayer
    • isBanned

      public boolean isBanned()
      Specified by:
      isBanned in interface org.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:
      ban in interface org.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:
      ban in interface org.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:
      ban in interface org.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 open InventoryView for this Player. The Predicate refers to the top inventory, not the PlayerInventory. It uses the method InventoryView.getTopInventory().
      Parameters:
      message - The message to display upon failure
      type - The InventoryType you are expecting
      predicate - A custom Predicate to check the opened Inventory.
    • 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 open InventoryView for this Player. The Predicate refers to the top inventory, not the PlayerInventory. It uses the method InventoryView.getTopInventory().
      Parameters:
      type - The InventoryType you are expecting
      predicate - A custom Predicate to check the opened Inventory.
    • assertInventoryView

      public void assertInventoryView(org.bukkit.event.inventory.InventoryType type)
      This method is an assertion for the currently open InventoryView for this Player.
      Parameters:
      type - The InventoryType you are expecting
    • assertInventoryView

      public void assertInventoryView(String message, org.bukkit.event.inventory.InventoryType type)
      This method is an assertion for the currently open InventoryView for this Player.
      Parameters:
      message - The message to display upon failure
      type - The InventoryType you are expecting
    • updateInventory

      public void updateInventory()
      Specified by:
      updateInventory in interface org.bukkit.entity.Player
    • performCommand

      public boolean performCommand(@NotNull @NotNull String command)
      Specified by:
      performCommand in interface org.bukkit.entity.Player
    • showDemoScreen

      public void showDemoScreen()
      Specified by:
      showDemoScreen in interface org.bukkit.entity.Player
    • isAllowingServerListings

      public boolean isAllowingServerListings()
      Specified by:
      isAllowingServerListings in interface org.bukkit.entity.Player
    • getEyeHeight

      public double getEyeHeight()
      Specified by:
      getEyeHeight in interface org.bukkit.entity.LivingEntity
      Overrides:
      getEyeHeight in class LivingEntityMock
    • getEyeHeight

      public double getEyeHeight(boolean ignorePose)
      Specified by:
      getEyeHeight in interface org.bukkit.entity.LivingEntity
      Overrides:
      getEyeHeight in class LivingEntityMock
    • getNoDamageTicks

      public int getNoDamageTicks()
      Specified by:
      getNoDamageTicks in interface org.bukkit.entity.LivingEntity
      Overrides:
      getNoDamageTicks in class LivingEntityMock
    • setNoDamageTicks

      public void setNoDamageTicks(int ticks)
      Specified by:
      setNoDamageTicks in interface org.bukkit.entity.LivingEntity
      Overrides:
      setNoDamageTicks in class LivingEntityMock
    • getEquipment

      public org.bukkit.inventory.EntityEquipment getEquipment()
      Specified by:
      getEquipment in interface org.bukkit.entity.HumanEntity
      Specified by:
      getEquipment in interface org.bukkit.entity.LivingEntity
      Overrides:
      getEquipment in class LivingEntityMock
    • isConversing

      public boolean isConversing()
      Specified by:
      isConversing in interface org.bukkit.conversations.Conversable
    • acceptConversationInput

      public void acceptConversationInput(@NotNull @NotNull String input)
      Specified by:
      acceptConversationInput in interface org.bukkit.conversations.Conversable
    • beginConversation

      public boolean beginConversation(@NotNull @NotNull org.bukkit.conversations.Conversation conversation)
      Specified by:
      beginConversation in interface org.bukkit.conversations.Conversable
    • abandonConversation

      public void abandonConversation(@NotNull @NotNull org.bukkit.conversations.Conversation conversation)
      Specified by:
      abandonConversation in interface org.bukkit.conversations.Conversable
    • abandonConversation

      public void abandonConversation(@NotNull @NotNull org.bukkit.conversations.Conversation conversation, @NotNull @NotNull org.bukkit.conversations.ConversationAbandonedEvent details)
      Specified by:
      abandonConversation in interface org.bukkit.conversations.Conversable
    • getFirstPlayed

      public long getFirstPlayed()
      Specified by:
      getFirstPlayed in interface org.bukkit.OfflinePlayer
    • getLastPlayed

      @Deprecated public long getLastPlayed()
      Deprecated.
      Specified by:
      getLastPlayed in interface org.bukkit.OfflinePlayer
    • hasPlayedBefore

      public boolean hasPlayedBefore()
      Specified by:
      hasPlayedBefore in interface org.bukkit.OfflinePlayer
    • setLastPlayed

      @Deprecated(forRemoval=true) public void setLastPlayed(long time)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Moved to MockPlayerList.
      No longer used.
      Parameters:
      time - N/A.
      See Also:
    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      Specified by:
      serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializable
    • sendPluginMessage

      public void sendPluginMessage(@NotNull @NotNull org.bukkit.plugin.Plugin source, @NotNull @NotNull String channel, byte[] message)
      Specified by:
      sendPluginMessage in interface org.bukkit.plugin.messaging.PluginMessageRecipient
    • getListeningPluginChannels

      @NotNull public @NotNull Set<String> getListeningPluginChannels()
      Specified by:
      getListeningPluginChannels in interface org.bukkit.plugin.messaging.PluginMessageRecipient
    • displayName

      @NotNull public @NotNull net.kyori.adventure.text.Component displayName()
      Specified by:
      displayName in interface org.bukkit.entity.Player
    • displayName

      public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component displayName)
      Specified by:
      displayName in interface org.bukkit.entity.Player
    • getDisplayName

      @Deprecated @NotNull public @NotNull String getDisplayName()
      Deprecated.
      Specified by:
      getDisplayName in interface org.bukkit.entity.Player
    • setDisplayName

      @Deprecated public void setDisplayName(@NotNull @NotNull String name)
      Deprecated.
      Specified by:
      setDisplayName in interface org.bukkit.entity.Player
    • getScoreboardEntry

      @NotNull public @NotNull String getScoreboardEntry()
      Description copied from class: EntityMock
      Gets the scoreboard entry for this entity.
      Overrides:
      getScoreboardEntry in class EntityMock
      Returns:
      The scoreboard entry.
    • playerListName

      public void playerListName(@Nullable @Nullable net.kyori.adventure.text.Component name)
      Specified by:
      playerListName in interface org.bukkit.entity.Player
    • playerListName

      @NotNull public @NotNull net.kyori.adventure.text.Component playerListName()
      Specified by:
      playerListName in interface org.bukkit.entity.Player
    • playerListHeader

      @Nullable public @Nullable net.kyori.adventure.text.Component playerListHeader()
      Specified by:
      playerListHeader in interface org.bukkit.entity.Player
    • playerListFooter

      @Nullable public @Nullable net.kyori.adventure.text.Component playerListFooter()
      Specified by:
      playerListFooter in interface org.bukkit.entity.Player
    • getPlayerListName

      @Deprecated @NotNull public @NotNull String getPlayerListName()
      Deprecated.
      Specified by:
      getPlayerListName in interface org.bukkit.entity.Player
    • setPlayerListName

      @Deprecated public void setPlayerListName(@Nullable @Nullable String name)
      Deprecated.
      Specified by:
      setPlayerListName in interface org.bukkit.entity.Player
    • setCompassTarget

      public void setCompassTarget(@NotNull @NotNull org.bukkit.Location loc)
      Specified by:
      setCompassTarget in interface org.bukkit.entity.Player
    • getCompassTarget

      @NotNull public @NotNull org.bukkit.Location getCompassTarget()
      Specified by:
      getCompassTarget in interface org.bukkit.entity.Player
    • setAddress

      public void setAddress(@Nullable @Nullable InetSocketAddress address)
      Sets the InetSocketAddress returned by getAddress().
      Parameters:
      address - The address to set.
    • getAddress

      @Nullable public @Nullable InetSocketAddress getAddress()
      Specified by:
      getAddress in interface com.destroystokyo.paper.network.NetworkClient
      Specified by:
      getAddress in interface org.bukkit.entity.Player
    • getHAProxyAddress

      @Nullable public @Nullable InetSocketAddress getHAProxyAddress()
      Specified by:
      getHAProxyAddress in interface org.bukkit.entity.Player
    • isTransferred

      public boolean isTransferred()
      Specified by:
      isTransferred in interface org.bukkit.entity.Player
    • transfer

      @Experimental public void transfer(@NotNull @NotNull String host, int port)
      Specified by:
      transfer in interface org.bukkit.entity.Player
    • retrieveCookie

      @Experimental @NotNull public @NotNull CompletableFuture<byte[]> retrieveCookie(@NotNull @NotNull org.bukkit.NamespacedKey key)
      Specified by:
      retrieveCookie in interface org.bukkit.entity.Player
    • storeCookie

      @Experimental public void storeCookie(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull @org.jetbrains.annotations.NotNull byte[] value)
      Specified by:
      storeCookie in interface org.bukkit.entity.Player
    • getProtocolVersion

      public int getProtocolVersion()
      Specified by:
      getProtocolVersion in interface com.destroystokyo.paper.network.NetworkClient
    • getVirtualHost

      @Nullable public @Nullable InetSocketAddress getVirtualHost()
      Specified by:
      getVirtualHost in interface com.destroystokyo.paper.network.NetworkClient
    • sendRawMessage

      public void sendRawMessage(@Nullable @Nullable String message)
      Specified by:
      sendRawMessage in interface org.bukkit.conversations.Conversable
      Specified by:
      sendRawMessage in interface org.bukkit.entity.Player
    • sendRawMessage

      public void sendRawMessage(@Nullable @Nullable UUID sender, @NotNull @NotNull String message)
      Specified by:
      sendRawMessage in interface org.bukkit.conversations.Conversable
    • kickPlayer

      @Deprecated public void kickPlayer(String message)
      Deprecated.
      Specified by:
      kickPlayer in interface org.bukkit.entity.Player
    • kick

      public void kick()
      Specified by:
      kick in interface org.bukkit.entity.Player
    • kick

      public void kick(@Nullable @Nullable net.kyori.adventure.text.Component message)
      Specified by:
      kick in interface org.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:
      kick in interface org.bukkit.entity.Player
    • chat

      public void chat(@NotNull @NotNull String msg)
      Specified by:
      chat in interface org.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:
      ban in interface org.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:
      ban in interface org.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:
      ban in interface org.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:
      banIp in interface org.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:
      banIp in interface org.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:
      banIp in interface org.bukkit.entity.Player
    • isSneaking

      public boolean isSneaking()
      Specified by:
      isSneaking in interface org.bukkit.entity.Entity
      Specified by:
      isSneaking in interface org.bukkit.entity.Player
      Overrides:
      isSneaking in class EntityMock
    • setSneaking

      public void setSneaking(boolean sneaking)
      Specified by:
      setSneaking in interface org.bukkit.entity.Entity
      Specified by:
      setSneaking in interface org.bukkit.entity.Player
      Overrides:
      setSneaking in class EntityMock
    • 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:
      isSprinting in interface org.bukkit.entity.Player
    • setSprinting

      public void setSprinting(boolean sprinting)
      Specified by:
      setSprinting in interface org.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:
      saveData in interface org.bukkit.entity.Player
    • loadData

      public void loadData()
      Specified by:
      loadData in interface org.bukkit.entity.Player
    • isSleepingIgnored

      public boolean isSleepingIgnored()
      Specified by:
      isSleepingIgnored in interface org.bukkit.entity.Player
    • setSleepingIgnored

      public void setSleepingIgnored(boolean isSleeping)
      Specified by:
      setSleepingIgnored in interface org.bukkit.entity.Player
    • playNote

      @Deprecated public void playNote(@NotNull @NotNull org.bukkit.Location loc, byte instrument, byte note)
      Deprecated.
      Specified by:
      playNote in interface org.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:
      playNote in interface org.bukkit.entity.Player
    • playSound

      public void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull String sound, float volume, float pitch)
      Specified by:
      playSound in interface org.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:
      playSound in interface org.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:
      playSound in interface org.bukkit.entity.Player
    • playSound

      public void playSound(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull String sound, float volume, float pitch)
      Specified by:
      playSound in interface org.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:
      playSound in interface org.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:
      playSound in interface org.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:
      playSound in interface org.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:
      playSound in interface org.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:
      playSound in interface org.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:
      playSound in interface org.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:
      playSound in interface org.bukkit.entity.Player
    • hasFlyingFallDamage

      @NotNull public @NotNull net.kyori.adventure.util.TriState hasFlyingFallDamage()
      Specified by:
      hasFlyingFallDamage in interface org.bukkit.entity.Player
    • setFlyingFallDamage

      public void setFlyingFallDamage(@NotNull @NotNull net.kyori.adventure.util.TriState flyingFallDamage)
      Specified by:
      setFlyingFallDamage in interface org.bukkit.entity.Player
    • setHasSeenWinScreen

      public void setHasSeenWinScreen(boolean hasSeenWinScreen)
      Specified by:
      setHasSeenWinScreen in interface org.bukkit.entity.Player
    • hasSeenWinScreen

      public boolean hasSeenWinScreen()
      Specified by:
      hasSeenWinScreen in interface org.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:
      playSound in interface org.bukkit.entity.Player
    • playSound

      public void playSound(@NotNull net.kyori.adventure.sound.Sound sound)
      Specified by:
      playSound in interface net.kyori.adventure.audience.Audience
    • playSound

      public void playSound(@NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z)
      Specified by:
      playSound in interface net.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:
      playSound in interface net.kyori.adventure.audience.Audience
    • getHeardSounds

      @NotNull public @NotNull List<AudioExperience> getHeardSounds()
      Description copied from interface: SoundReceiver
      This returns a List of every AudioExperience this receiver has received.
      Specified by:
      getHeardSounds in interface SoundReceiver
      Returns:
      A mutable List containing every heard sound.
    • addHeardSound

      public void addHeardSound(@NotNull @NotNull AudioExperience audioExperience)
      Description copied from interface: SoundReceiver
      Adds a heard sound.
      Specified by:
      addHeardSound in interface SoundReceiver
      Parameters:
      audioExperience - An AudioExperience representing the heard sound.
    • stopSound

      public void stopSound(@NotNull @NotNull org.bukkit.Sound sound)
      Specified by:
      stopSound in interface org.bukkit.entity.Player
    • stopSound

      public void stopSound(@NotNull @NotNull String sound)
      Specified by:
      stopSound in interface org.bukkit.entity.Player
    • stopSound

      public void stopSound(@NotNull @NotNull org.bukkit.Sound sound, @Nullable @Nullable org.bukkit.SoundCategory category)
      Specified by:
      stopSound in interface org.bukkit.entity.Player
    • stopSound

      public void stopSound(@NotNull @NotNull String sound, @Nullable @Nullable org.bukkit.SoundCategory category)
      Specified by:
      stopSound in interface org.bukkit.entity.Player
    • stopSound

      public void stopSound(@NotNull @NotNull org.bukkit.SoundCategory category)
      Specified by:
      stopSound in interface org.bukkit.entity.Player
    • stopAllSounds

      public void stopAllSounds()
      Specified by:
      stopAllSounds in interface org.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:
      playEffect in interface org.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:
      playEffect in interface org.bukkit.entity.Player
    • breakBlock

      public boolean breakBlock(@NotNull @NotNull org.bukkit.block.Block block)
      Specified by:
      breakBlock in interface org.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:
      sendBlockChange in interface org.bukkit.entity.Player
    • sendBlockChange

      public void sendBlockChange(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.block.data.BlockData block)
      Specified by:
      sendBlockChange in interface org.bukkit.entity.Player
    • sendBlockChanges

      public void sendBlockChanges(@NotNull @NotNull Collection<org.bukkit.block.BlockState> blocks)
      Specified by:
      sendBlockChanges in interface org.bukkit.entity.Player
    • sendBlockChanges

      public void sendBlockChanges(@NotNull @NotNull Collection<org.bukkit.block.BlockState> blocks, boolean suppressLightUpdates)
      Specified by:
      sendBlockChanges in interface org.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:
      sendSignChange in interface org.bukkit.entity.Player
      Throws:
      IllegalArgumentException
    • sendSignChange

      @Deprecated public void sendSignChange(@NotNull @NotNull org.bukkit.Location loc, String[] lines)
      Deprecated.
      Specified by:
      sendSignChange in interface org.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:
      sendSignChange in interface org.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:
      sendSignChange in interface org.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:
      sendBlockUpdate in interface org.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:
      sendPotionEffectChange in interface org.bukkit.entity.Player
    • sendPotionEffectChangeRemove

      public void sendPotionEffectChangeRemove(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull org.bukkit.potion.PotionEffectType type)
      Specified by:
      sendPotionEffectChangeRemove in interface org.bukkit.entity.Player
    • sendMap

      public void sendMap(@NotNull @NotNull org.bukkit.map.MapView map)
      Specified by:
      sendMap in interface org.bukkit.entity.Player
    • showWinScreen

      public void showWinScreen()
      Specified by:
      showWinScreen in interface org.bukkit.entity.Player
    • sendActionBar

      @Deprecated public void sendActionBar(@NotNull @NotNull String message)
      Deprecated.
      Specified by:
      sendActionBar in interface org.bukkit.entity.Player
    • sendActionBar

      @Deprecated public void sendActionBar(char alternateChar, @NotNull @NotNull String message)
      Deprecated.
      Specified by:
      sendActionBar in interface org.bukkit.entity.Player
    • sendActionBar

      @Deprecated public void sendActionBar(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent... message)
      Deprecated.
      Specified by:
      sendActionBar in interface org.bukkit.entity.Player
    • setPlayerListHeaderFooter

      @Deprecated public void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent @NotNull [] header, net.md_5.bungee.api.chat.BaseComponent @NotNull [] footer)
      Deprecated.
      Specified by:
      setPlayerListHeaderFooter in interface org.bukkit.entity.Player
    • setPlayerListHeaderFooter

      @Deprecated public void setPlayerListHeaderFooter(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent header, @Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent footer)
      Deprecated.
      Specified by:
      setPlayerListHeaderFooter in interface org.bukkit.entity.Player
    • setTitleTimes

      @Deprecated public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks)
      Deprecated.
      Specified by:
      setTitleTimes in interface org.bukkit.entity.Player
    • setSubtitle

      @Deprecated public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle)
      Deprecated.
      Specified by:
      setSubtitle in interface org.bukkit.entity.Player
    • setSubtitle

      @Deprecated public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle)
      Deprecated.
      Specified by:
      setSubtitle in interface org.bukkit.entity.Player
    • showTitle

      @Deprecated public void showTitle(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent[] title)
      Deprecated.
      Specified by:
      showTitle in interface org.bukkit.entity.Player
    • showTitle

      @Deprecated public void showTitle(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent title)
      Deprecated.
      Specified by:
      showTitle in interface org.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:
      showTitle in interface org.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:
      showTitle in interface org.bukkit.entity.Player
    • sendTitle

      @Deprecated public void sendTitle(@NotNull @NotNull com.destroystokyo.paper.Title title)
      Deprecated.
      Specified by:
      sendTitle in interface org.bukkit.entity.Player
    • updateTitle

      @Deprecated public void updateTitle(@NotNull @NotNull com.destroystokyo.paper.Title title)
      Deprecated.
      Specified by:
      updateTitle in interface org.bukkit.entity.Player
    • hideTitle

      @Deprecated public void hideTitle()
      Deprecated.
      Specified by:
      hideTitle in interface org.bukkit.entity.Player
    • getPreviousGameMode

      @Nullable public @Nullable org.bukkit.GameMode getPreviousGameMode()
      Specified by:
      getPreviousGameMode in interface org.bukkit.entity.Player
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int amount)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int amount)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int newValue)
      Specified by:
      setStatistic in interface org.bukkit.OfflinePlayer
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic)
      Specified by:
      getStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material)
      Specified by:
      getStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int amount)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int amount)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int newValue)
      Specified by:
      setStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType)
      Specified by:
      getStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int amount)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int amount)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int newValue)
      Specified by:
      setStatistic in interface org.bukkit.OfflinePlayer
    • setPlayerTime

      public void setPlayerTime(long time, boolean relative)
      Specified by:
      setPlayerTime in interface org.bukkit.entity.Player
    • getPlayerTime

      public long getPlayerTime()
      Specified by:
      getPlayerTime in interface org.bukkit.entity.Player
    • getPlayerTimeOffset

      public long getPlayerTimeOffset()
      Specified by:
      getPlayerTimeOffset in interface org.bukkit.entity.Player
    • isPlayerTimeRelative

      public boolean isPlayerTimeRelative()
      Specified by:
      isPlayerTimeRelative in interface org.bukkit.entity.Player
    • resetPlayerTime

      public void resetPlayerTime()
      Specified by:
      resetPlayerTime in interface org.bukkit.entity.Player
    • getPlayerWeather

      public org.bukkit.WeatherType getPlayerWeather()
      Specified by:
      getPlayerWeather in interface org.bukkit.entity.Player
    • setPlayerWeather

      public void setPlayerWeather(@NotNull @NotNull org.bukkit.WeatherType type)
      Specified by:
      setPlayerWeather in interface org.bukkit.entity.Player
    • resetPlayerWeather

      public void resetPlayerWeather()
      Specified by:
      resetPlayerWeather in interface org.bukkit.entity.Player
    • giveExp

      public void giveExp(int amount)
      Specified by:
      giveExp in interface org.bukkit.entity.Player
    • getExpCooldown

      public int getExpCooldown()
      Specified by:
      getExpCooldown in interface org.bukkit.entity.Player
    • setExpCooldown

      public void setExpCooldown(int ticks)
      Specified by:
      setExpCooldown in interface org.bukkit.entity.Player
    • giveExp

      public void giveExp(int amount, boolean applyMending)
      Specified by:
      giveExp in interface org.bukkit.entity.Player
    • applyMending

      public int applyMending(int amount)
      Specified by:
      applyMending in interface org.bukkit.entity.Player
    • giveExpLevels

      public void giveExpLevels(int amount)
      Specified by:
      giveExpLevels in interface org.bukkit.entity.Player
    • getExp

      public float getExp()
      Specified by:
      getExp in interface org.bukkit.entity.Player
    • setExp

      public void setExp(float exp)
      Specified by:
      setExp in interface org.bukkit.entity.Player
    • getLevel

      public int getLevel()
      Specified by:
      getLevel in interface org.bukkit.entity.Player
    • setLevel

      public void setLevel(int level)
      Specified by:
      setLevel in interface org.bukkit.entity.Player
    • getTotalExperience

      public int getTotalExperience()
      Specified by:
      getTotalExperience in interface org.bukkit.entity.Player
    • setTotalExperience

      public void setTotalExperience(int exp)
      Specified by:
      setTotalExperience in interface org.bukkit.entity.Player
    • calculateTotalExperiencePoints

      public @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int calculateTotalExperiencePoints()
      Specified by:
      calculateTotalExperiencePoints in interface org.bukkit.entity.Player
    • setExperienceLevelAndProgress

      public void setExperienceLevelAndProgress(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int totalExperience)
      Specified by:
      setExperienceLevelAndProgress in interface org.bukkit.entity.Player
    • getExperiencePointsNeededForNextLevel

      public int getExperiencePointsNeededForNextLevel()
      Specified by:
      getExperiencePointsNeededForNextLevel in interface org.bukkit.entity.Player
    • getRespawnLocation

      @Nullable public @Nullable org.bukkit.Location getRespawnLocation()
      Specified by:
      getRespawnLocation in interface org.bukkit.OfflinePlayer
      Specified by:
      getRespawnLocation in interface org.bukkit.entity.Player
    • getBedSpawnLocation

      @Nullable public @Nullable org.bukkit.Location getBedSpawnLocation()
      Specified by:
      getBedSpawnLocation in interface org.bukkit.OfflinePlayer
      Specified by:
      getBedSpawnLocation in interface org.bukkit.entity.Player
    • getLastLogin

      public long getLastLogin()
      Specified by:
      getLastLogin in interface org.bukkit.OfflinePlayer
    • getLastSeen

      public long getLastSeen()
      Specified by:
      getLastSeen in interface org.bukkit.OfflinePlayer
    • setRespawnLocation

      public void setRespawnLocation(@Nullable @Nullable org.bukkit.Location loc)
      Specified by:
      setRespawnLocation in interface org.bukkit.entity.Player
    • setBedSpawnLocation

      public void setBedSpawnLocation(@Nullable @Nullable org.bukkit.Location loc)
      Specified by:
      setBedSpawnLocation in interface org.bukkit.entity.Player
    • setBedSpawnLocation

      public void setBedSpawnLocation(@Nullable @Nullable org.bukkit.Location loc, boolean override)
      Specified by:
      setBedSpawnLocation in interface org.bukkit.entity.Player
    • setRespawnLocation

      public void setRespawnLocation(@Nullable @Nullable org.bukkit.Location loc, boolean override)
      Specified by:
      setRespawnLocation in interface org.bukkit.entity.Player
    • getAllowFlight

      public boolean getAllowFlight()
      Specified by:
      getAllowFlight in interface org.bukkit.entity.Player
    • setAllowFlight

      public void setAllowFlight(boolean flight)
      Specified by:
      setAllowFlight in interface org.bukkit.entity.Player
    • hidePlayer

      @Deprecated public void hidePlayer(@NotNull @NotNull org.bukkit.entity.Player player)
      Deprecated.
      Specified by:
      hidePlayer in interface org.bukkit.entity.Player
    • hidePlayer

      public void hidePlayer(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      hidePlayer in interface org.bukkit.entity.Player
    • showPlayer

      @Deprecated public void showPlayer(@NotNull @NotNull org.bukkit.entity.Player player)
      Deprecated.
      Specified by:
      showPlayer in interface org.bukkit.entity.Player
    • showPlayer

      public void showPlayer(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      showPlayer in interface org.bukkit.entity.Player
    • canSee

      public boolean canSee(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      canSee in interface org.bukkit.entity.Player
    • hideEntity

      @Experimental public void hideEntity(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Entity entity)
      Specified by:
      hideEntity in interface org.bukkit.entity.Player
    • showEntity

      @Experimental public void showEntity(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Entity entity)
      Specified by:
      showEntity in interface org.bukkit.entity.Player
    • canSee

      public boolean canSee(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Specified by:
      canSee in interface org.bukkit.entity.Player
    • isListed

      public boolean isListed(@NotNull @NotNull org.bukkit.entity.Player other)
      Specified by:
      isListed in interface org.bukkit.entity.Player
    • unlistPlayer

      public boolean unlistPlayer(@NotNull @NotNull org.bukkit.entity.Player other)
      Specified by:
      unlistPlayer in interface org.bukkit.entity.Player
    • listPlayer

      public boolean listPlayer(@NotNull @NotNull org.bukkit.entity.Player other)
      Specified by:
      listPlayer in interface org.bukkit.entity.Player
    • isFlying

      public boolean isFlying()
      Specified by:
      isFlying in interface org.bukkit.entity.Player
    • setFlying

      public void setFlying(boolean value)
      Specified by:
      setFlying in interface org.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:
      getFlySpeed in interface org.bukkit.entity.Player
    • setFlySpeed

      public void setFlySpeed(float value)
      Specified by:
      setFlySpeed in interface org.bukkit.entity.Player
    • getWalkSpeed

      public float getWalkSpeed()
      Specified by:
      getWalkSpeed in interface org.bukkit.entity.Player
    • setWalkSpeed

      public void setWalkSpeed(float value)
      Specified by:
      setWalkSpeed in interface org.bukkit.entity.Player
    • setTexturePack

      @Deprecated public void setTexturePack(@NotNull @NotNull String url)
      Deprecated.
      Specified by:
      setTexturePack in interface org.bukkit.entity.Player
    • setResourcePack

      @Deprecated public void setResourcePack(@NotNull @NotNull String url)
      Deprecated.
      Specified by:
      setResourcePack in interface org.bukkit.entity.Player
    • setResourcePack

      public void setResourcePack(@NotNull @NotNull String url, byte[] hash)
      Specified by:
      setResourcePack in interface org.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:
      setResourcePack in interface org.bukkit.entity.Player
    • setResourcePack

      public void setResourcePack(@NotNull @NotNull String url, byte[] hash, boolean force)
      Specified by:
      setResourcePack in interface org.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:
      setResourcePack in interface org.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:
      setResourcePack in interface org.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:
      setResourcePack in interface org.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:
      setResourcePack in interface org.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:
      setResourcePack in interface org.bukkit.entity.Player
    • getScoreboard

      @NotNull public @NotNull org.bukkit.scoreboard.Scoreboard getScoreboard()
      Specified by:
      getScoreboard in interface org.bukkit.entity.Player
    • setScoreboard

      public void setScoreboard(@NotNull @NotNull org.bukkit.scoreboard.Scoreboard scoreboard)
      Specified by:
      setScoreboard in interface org.bukkit.entity.Player
    • getWorldBorder

      @Nullable public @Nullable org.bukkit.WorldBorder getWorldBorder()
      Specified by:
      getWorldBorder in interface org.bukkit.entity.Player
    • setWorldBorder

      public void setWorldBorder(@Nullable @Nullable org.bukkit.WorldBorder border)
      Specified by:
      setWorldBorder in interface org.bukkit.entity.Player
    • setHealth

      public void setHealth(double health)
      Specified by:
      setHealth in interface org.bukkit.entity.Damageable
      Overrides:
      setHealth in class LivingEntityMock
    • isHealthScaled

      public boolean isHealthScaled()
      Specified by:
      isHealthScaled in interface org.bukkit.entity.Player
    • setHealthScaled

      public void setHealthScaled(boolean scale)
      Specified by:
      setHealthScaled in interface org.bukkit.entity.Player
    • getHealthScale

      public double getHealthScale()
      Specified by:
      getHealthScale in interface org.bukkit.entity.Player
    • setHealthScale

      public void setHealthScale(double scale)
      Specified by:
      setHealthScale in interface org.bukkit.entity.Player
    • sendHealthUpdate

      public void sendHealthUpdate(double health, int foodLevel, float saturationLevel)
      Specified by:
      sendHealthUpdate in interface org.bukkit.entity.Player
    • sendHealthUpdate

      public void sendHealthUpdate()
      Specified by:
      sendHealthUpdate in interface org.bukkit.entity.Player
    • getSpectatorTarget

      public org.bukkit.entity.Entity getSpectatorTarget()
      Specified by:
      getSpectatorTarget in interface org.bukkit.entity.Player
    • setSpectatorTarget

      public void setSpectatorTarget(org.bukkit.entity.Entity entity)
      Specified by:
      setSpectatorTarget in interface org.bukkit.entity.Player
    • sendTitle

      @Deprecated public void sendTitle(String title, String subtitle)
      Deprecated.
      Specified by:
      sendTitle in interface org.bukkit.entity.Player
    • sendTitle

      @Deprecated public void sendTitle(String title, String subtitle, int fadeIn, int stay, int fadeOut)
      Deprecated.
      Specified by:
      sendTitle in interface org.bukkit.entity.Player
    • nextTitle

      @Nullable public @Nullable String nextTitle()
      Returns:
      The next title sent to the player.
    • nextSubTitle

      @Nullable public @Nullable String nextSubTitle()
      Returns:
      The next subtitle sent to the player.
    • resetTitle

      public void resetTitle()
      Specified by:
      resetTitle in interface net.kyori.adventure.audience.Audience
      Specified by:
      resetTitle in interface org.bukkit.entity.Player
    • showBossBar

      public void showBossBar(@NotNull @NotNull net.kyori.adventure.bossbar.BossBar bar)
      Specified by:
      showBossBar in interface net.kyori.adventure.audience.Audience
    • hideBossBar

      public void hideBossBar(@NotNull @NotNull net.kyori.adventure.bossbar.BossBar bar)
      Specified by:
      hideBossBar in interface net.kyori.adventure.audience.Audience
    • getBossBars

      @NotNull public @UnmodifiableView @NotNull Set<net.kyori.adventure.bossbar.BossBar> getBossBars()
      Gets an unmodifiable set of all active boss bars currently shown to this player. Helper method to activeBossBars().
      See Also:
    • activeBossBars

      @NotNull public @UnmodifiableView @NotNull Iterable<? extends net.kyori.adventure.bossbar.BossBar> activeBossBars()
      Specified by:
      activeBossBars in interface net.kyori.adventure.bossbar.BossBarViewer
      Specified by:
      activeBossBars in interface org.bukkit.entity.Player
    • spawnParticle

      public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int count)
      Specified by:
      spawnParticle in interface org.bukkit.entity.Player
    • spawnParticle

      public void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double x, double y, double z, int count)
      Specified by:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.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:
      spawnParticle in interface org.bukkit.entity.Player
    • getAdvancementProgress

      @NotNull public @NotNull org.bukkit.advancement.AdvancementProgress getAdvancementProgress(@NotNull @NotNull org.bukkit.advancement.Advancement advancement)
      Specified by:
      getAdvancementProgress in interface org.bukkit.entity.Player
    • getLocale

      @NotNull public @NotNull String getLocale()
      Specified by:
      getLocale in interface org.bukkit.entity.Player
    • getAffectsSpawning

      public boolean getAffectsSpawning()
      Specified by:
      getAffectsSpawning in interface org.bukkit.entity.Player
    • setAffectsSpawning

      public void setAffectsSpawning(boolean affects)
      Specified by:
      setAffectsSpawning in interface org.bukkit.entity.Player
    • getViewDistance

      public int getViewDistance()
      Specified by:
      getViewDistance in interface org.bukkit.entity.Player
    • setViewDistance

      public void setViewDistance(int viewDistance)
      Specified by:
      setViewDistance in interface org.bukkit.entity.Player
    • getSimulationDistance

      public int getSimulationDistance()
      Specified by:
      getSimulationDistance in interface org.bukkit.entity.Player
    • setSimulationDistance

      public void setSimulationDistance(int simulationDistance)
      Specified by:
      setSimulationDistance in interface org.bukkit.entity.Player
    • getNoTickViewDistance

      @Deprecated public int getNoTickViewDistance()
      Deprecated.
      Specified by:
      getNoTickViewDistance in interface org.bukkit.entity.Player
    • setNoTickViewDistance

      @Deprecated public void setNoTickViewDistance(int viewDistance)
      Deprecated.
      Specified by:
      setNoTickViewDistance in interface org.bukkit.entity.Player
    • getSendViewDistance

      public int getSendViewDistance()
      Specified by:
      getSendViewDistance in interface org.bukkit.entity.Player
    • setSendViewDistance

      public void setSendViewDistance(int viewDistance)
      Specified by:
      setSendViewDistance in interface org.bukkit.entity.Player
    • getPlayerListHeader

      public String getPlayerListHeader()
      Specified by:
      getPlayerListHeader in interface org.bukkit.entity.Player
    • setPlayerListHeader

      public void setPlayerListHeader(@Nullable @Nullable String header)
      Specified by:
      setPlayerListHeader in interface org.bukkit.entity.Player
    • getPlayerListFooter

      public String getPlayerListFooter()
      Specified by:
      getPlayerListFooter in interface org.bukkit.entity.Player
    • setPlayerListFooter

      public void setPlayerListFooter(@Nullable @Nullable String footer)
      Specified by:
      setPlayerListFooter in interface org.bukkit.entity.Player
    • setPlayerListHeaderFooter

      public void setPlayerListHeaderFooter(@Nullable @Nullable String header, @Nullable @Nullable String footer)
      Specified by:
      setPlayerListHeaderFooter in interface org.bukkit.entity.Player
    • updateCommands

      public void updateCommands()
      Specified by:
      updateCommands in interface org.bukkit.entity.Player
    • getClientViewDistance

      public int getClientViewDistance()
      Specified by:
      getClientViewDistance in interface org.bukkit.entity.Player
    • locale

      @NotNull public @NotNull Locale locale()
      Specified by:
      locale in interface org.bukkit.entity.Player
    • openBook

      public void openBook(@NotNull @NotNull org.bukkit.inventory.ItemStack book)
      Specified by:
      openBook in interface org.bukkit.entity.Player
    • openSign

      public void openSign(@NotNull @NotNull org.bukkit.block.Sign sign, @NotNull @NotNull org.bukkit.block.sign.Side side)
      Specified by:
      openSign in interface org.bukkit.entity.HumanEntity
      Specified by:
      openSign in interface org.bukkit.entity.Player
    • setResourcePack

      public void setResourcePack(@NotNull @NotNull String url, @NotNull @NotNull String hash)
      Specified by:
      setResourcePack in interface org.bukkit.entity.Player
    • setResourcePack

      public void setResourcePack(@NotNull @NotNull String url, @NotNull @NotNull String hash, boolean required)
      Specified by:
      setResourcePack in interface org.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:
      setResourcePack in interface org.bukkit.entity.Player
    • getResourcePackStatus

      public @Nullable org.bukkit.event.player.PlayerResourcePackStatusEvent.Status getResourcePackStatus()
      Specified by:
      getResourcePackStatus in interface org.bukkit.entity.Player
    • getResourcePackHash

      @Deprecated(forRemoval=true) @Nullable public @Nullable String getResourcePackHash()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getResourcePackHash in interface org.bukkit.entity.Player
    • hasResourcePack

      public boolean hasResourcePack()
      Specified by:
      hasResourcePack in interface org.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:
      addResourcePack in interface org.bukkit.entity.Player
    • removeResourcePack

      public void removeResourcePack(@NotNull @NotNull UUID id)
      Specified by:
      removeResourcePack in interface org.bukkit.entity.Player
    • removeResourcePacks

      public void removeResourcePacks()
      Specified by:
      removeResourcePacks in interface org.bukkit.entity.Player
    • getPlayerProfile

      @NotNull public @NotNull com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile()
      Specified by:
      getPlayerProfile in interface org.bukkit.OfflinePlayer
      Specified by:
      getPlayerProfile in interface org.bukkit.entity.Player
    • setPlayerProfile

      public void setPlayerProfile(@NotNull @NotNull com.destroystokyo.paper.profile.PlayerProfile profile)
      Specified by:
      setPlayerProfile in interface org.bukkit.entity.Player
    • getCooldownPeriod

      public float getCooldownPeriod()
      Specified by:
      getCooldownPeriod in interface org.bukkit.entity.Player
    • getCooledAttackStrength

      public float getCooledAttackStrength(float adjustTicks)
      Specified by:
      getCooledAttackStrength in interface org.bukkit.entity.Player
    • resetCooldown

      public void resetCooldown()
      Specified by:
      resetCooldown in interface org.bukkit.entity.Player
    • getClientOption

      @NotNull public <T> T getClientOption(@NotNull @NotNull com.destroystokyo.paper.ClientOption<T> option)
      Specified by:
      getClientOption in interface org.bukkit.entity.Player
    • boostElytra

      @Nullable public @Nullable org.bukkit.entity.Firework boostElytra(@NotNull @NotNull org.bukkit.inventory.ItemStack firework)
      Specified by:
      boostElytra in interface org.bukkit.entity.Player
    • sendOpLevel

      public void sendOpLevel(byte level)
      Specified by:
      sendOpLevel in interface org.bukkit.entity.Player
    • addAdditionalChatCompletions

      public void addAdditionalChatCompletions(@NotNull @NotNull Collection<String> completions)
      Specified by:
      addAdditionalChatCompletions in interface org.bukkit.entity.Player
    • removeAdditionalChatCompletions

      public void removeAdditionalChatCompletions(@NotNull @NotNull Collection<String> completions)
      Specified by:
      removeAdditionalChatCompletions in interface org.bukkit.entity.Player
    • getClientBrandName

      @Nullable public @Nullable String getClientBrandName()
      Specified by:
      getClientBrandName in interface org.bukkit.entity.Player
    • addCustomChatCompletions

      public void addCustomChatCompletions(@NotNull @NotNull Collection<String> completions)
      Specified by:
      addCustomChatCompletions in interface org.bukkit.entity.Player
    • removeCustomChatCompletions

      public void removeCustomChatCompletions(@NotNull @NotNull Collection<String> completions)
      Specified by:
      removeCustomChatCompletions in interface org.bukkit.entity.Player
    • setCustomChatCompletions

      public void setCustomChatCompletions(@NotNull @NotNull Collection<String> completions)
      Specified by:
      setCustomChatCompletions in interface org.bukkit.entity.Player
    • lookAt

      public void lookAt(double x, double y, double z, @NotNull @NotNull io.papermc.paper.entity.LookAnchor playerAnchor)
      Specified by:
      lookAt in interface org.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:
      lookAt in interface org.bukkit.entity.Player
    • showElderGuardian

      public void showElderGuardian(boolean silent)
      Specified by:
      showElderGuardian in interface org.bukkit.entity.Player
    • getWardenWarningCooldown

      public int getWardenWarningCooldown()
      Specified by:
      getWardenWarningCooldown in interface org.bukkit.entity.Player
    • setWardenWarningCooldown

      public void setWardenWarningCooldown(int cooldown)
      Specified by:
      setWardenWarningCooldown in interface org.bukkit.entity.Player
    • getWardenTimeSinceLastWarning

      public int getWardenTimeSinceLastWarning()
      Specified by:
      getWardenTimeSinceLastWarning in interface org.bukkit.entity.Player
    • setWardenTimeSinceLastWarning

      public void setWardenTimeSinceLastWarning(int time)
      Specified by:
      setWardenTimeSinceLastWarning in interface org.bukkit.entity.Player
    • getWardenWarningLevel

      public int getWardenWarningLevel()
      Specified by:
      getWardenWarningLevel in interface org.bukkit.entity.Player
    • setWardenWarningLevel

      public void setWardenWarningLevel(int warningLevel)
      Specified by:
      setWardenWarningLevel in interface org.bukkit.entity.Player
    • increaseWardenWarningLevel

      public void increaseWardenWarningLevel()
      Specified by:
      increaseWardenWarningLevel in interface org.bukkit.entity.Player
    • attack

      public void attack(@NotNull @NotNull org.bukkit.entity.Entity target)
      Specified by:
      attack in interface org.bukkit.entity.LivingEntity
      Overrides:
      attack in class LivingEntityMock
    • startUsingItem

      public void startUsingItem(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot hand)
      Specified by:
      startUsingItem in interface org.bukkit.entity.LivingEntity
      Overrides:
      startUsingItem in class LivingEntityMock
    • completeUsingActiveItem

      public void completeUsingActiveItem()
      Specified by:
      completeUsingActiveItem in interface org.bukkit.entity.LivingEntity
      Overrides:
      completeUsingActiveItem in class LivingEntityMock
    • getActiveItemRemainingTime

      public int getActiveItemRemainingTime()
      Specified by:
      getActiveItemRemainingTime in interface org.bukkit.entity.LivingEntity
      Overrides:
      getActiveItemRemainingTime in class LivingEntityMock
    • setActiveItemRemainingTime

      public void setActiveItemRemainingTime(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int ticks)
      Specified by:
      setActiveItemRemainingTime in interface org.bukkit.entity.LivingEntity
      Overrides:
      setActiveItemRemainingTime in class LivingEntityMock
    • hasActiveItem

      public boolean hasActiveItem()
      Specified by:
      hasActiveItem in interface org.bukkit.entity.LivingEntity
      Overrides:
      hasActiveItem in class LivingEntityMock
    • getActiveItemUsedTime

      public int getActiveItemUsedTime()
      Specified by:
      getActiveItemUsedTime in interface org.bukkit.entity.LivingEntity
      Overrides:
      getActiveItemUsedTime in class LivingEntityMock
    • getActiveItemHand

      @NotNull public @NotNull org.bukkit.inventory.EquipmentSlot getActiveItemHand()
      Specified by:
      getActiveItemHand in interface org.bukkit.entity.LivingEntity
      Overrides:
      getActiveItemHand in class LivingEntityMock
    • broadcastSlotBreak

      public void broadcastSlotBreak(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot)
      Specified by:
      broadcastSlotBreak in interface org.bukkit.entity.LivingEntity
      Overrides:
      broadcastSlotBreak in class LivingEntityMock
    • getIdleDuration

      @NotNull public @NotNull Duration getIdleDuration()
      Specified by:
      getIdleDuration in interface org.bukkit.entity.Player
    • resetIdleDuration

      public void resetIdleDuration()
      Specified by:
      resetIdleDuration in interface org.bukkit.entity.Player
    • getSentChunkKeys

      @NotNull public @NotNull @Unmodifiable Set<Long> getSentChunkKeys()
      Specified by:
      getSentChunkKeys in interface org.bukkit.entity.Player
    • getSentChunks

      @NotNull public @NotNull @Unmodifiable Set<org.bukkit.Chunk> getSentChunks()
      Specified by:
      getSentChunks in interface org.bukkit.entity.Player
    • isChunkSent

      public boolean isChunkSent(long chunkKey)
      Specified by:
      isChunkSent in interface org.bukkit.entity.Player
    • getTrackedBy

      @NotNull public @NotNull Set<org.bukkit.entity.Player> getTrackedBy()
      Specified by:
      getTrackedBy in interface org.bukkit.entity.Entity
      Overrides:
      getTrackedBy in class EntityMock
    • 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:
      launchProjectile in interface org.bukkit.projectiles.ProjectileSource
      Overrides:
      launchProjectile in class LivingEntityMock
    • broadcastSlotBreak

      public void broadcastSlotBreak(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot, @NotNull @NotNull Collection<org.bukkit.entity.Player> players)
      Specified by:
      broadcastSlotBreak in interface org.bukkit.entity.LivingEntity
      Overrides:
      broadcastSlotBreak in class LivingEntityMock
    • damageItemStack

      @NotNull public @NotNull org.bukkit.inventory.ItemStack damageItemStack(@NotNull @NotNull org.bukkit.inventory.ItemStack stack, int amount)
      Specified by:
      damageItemStack in interface org.bukkit.entity.LivingEntity
      Overrides:
      damageItemStack in class LivingEntityMock
    • damageItemStack

      public void damageItemStack(@NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot, int amount)
      Specified by:
      damageItemStack in interface org.bukkit.entity.LivingEntity
      Overrides:
      damageItemStack in class LivingEntityMock
    • sendExperienceChange

      public void sendExperienceChange(float progress)
      Specified by:
      sendExperienceChange in interface org.bukkit.entity.Player
    • sendExperienceChange

      public void sendExperienceChange(float progress, int level)
      Specified by:
      sendExperienceChange in interface org.bukkit.entity.Player
    • sendBlockDamage

      public void sendBlockDamage(@NotNull @NotNull org.bukkit.Location loc, float progress)
      Specified by:
      sendBlockDamage in interface org.bukkit.entity.Player
    • sendMultiBlockChange

      public void sendMultiBlockChange(@NotNull @NotNull Map<? extends io.papermc.paper.math.Position,org.bukkit.block.data.BlockData> blockChanges)
      Specified by:
      sendMultiBlockChange in interface org.bukkit.entity.Player
    • sendBlockDamage

      public void sendBlockDamage(@NotNull @NotNull org.bukkit.Location loc, float progress, int destroyerIdentity)
      Specified by:
      sendBlockDamage in interface org.bukkit.entity.Player
    • sendHurtAnimation

      public void sendHurtAnimation(float yaw)
      Specified by:
      sendHurtAnimation in interface org.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:
      sendMultiBlockChange in interface org.bukkit.entity.Player
    • sendBlockDamage

      public void sendBlockDamage(@NotNull @NotNull org.bukkit.Location loc, float progress, @NotNull @NotNull org.bukkit.entity.Entity source)
      Specified by:
      sendBlockDamage in interface org.bukkit.entity.Player
    • getPing

      public int getPing()
      Specified by:
      getPing in interface org.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:
      teleport in interface org.bukkit.entity.Entity
      Overrides:
      teleport in class EntityMock
    • 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:
      teleportAsync in interface org.bukkit.entity.Entity
      Overrides:
      teleportAsync in class EntityMock
    • 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:
      sendEquipmentChange in interface org.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:
      sendEquipmentChange in interface org.bukkit.entity.Player
    • isOp

      public boolean isOp()
      Specified by:
      isOp in interface org.bukkit.permissions.ServerOperator
      Overrides:
      isOp in class EntityMock
    • setOp

      public void setOp(boolean isOperator)
      Specified by:
      setOp in interface org.bukkit.permissions.ServerOperator
      Overrides:
      setOp in class EntityMock
    • getEntityState

      protected EntityState getEntityState()
      Description copied from class: EntityMock
      Get the current state of this entity
      Overrides:
      getEntityState in class EntityMock
      Returns:
      The current state of this entity
    • spigot

      public @NotNull org.bukkit.entity.Player.Spigot spigot()
      Specified by:
      spigot in interface org.bukkit.command.CommandSender
      Specified by:
      spigot in interface org.bukkit.entity.Entity
      Specified by:
      spigot in interface org.bukkit.entity.Player
      Overrides:
      spigot in class EntityMock
    • setLocale

      public void setLocale(@NotNull @NotNull Locale locale)
      Sets player locale
      Parameters:
      locale - the locale