Class PlayerStabEvent

java.lang.Object
net.minestom.server.event.player.PlayerStabEvent
All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, PlayerEvent, PlayerInstanceEvent

public class PlayerStabEvent extends Object implements PlayerInstanceEvent
Called when a player attempts to use a stab attack on an item with the PiercingWeapon enchantment.
  • Constructor Details

    • PlayerStabEvent

      public PlayerStabEvent(Player player)
  • Method Details

    • getPlayer

      public Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player
    • getItemStack

      public ItemStack getItemStack()
      Gets the item which the player attacked with.
      Returns:
      the item in main hand