Package org.bukkit.event.player

# Class PlayerEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent

Direct Known Subclasses:
  `AbstractChatEvent`, `AsyncPlayerChatEvent`, `IllegalPacketEvent`, `LootableInventoryReplenishEvent`, `PlayerAdvancementCriterionGrantEvent`, `PlayerAdvancementDoneEvent`, `PlayerAnimationEvent`, `PlayerArmorChangeEvent`, `PlayerAttackEntityCooldownResetEvent`, `PlayerAttemptPickupItemEvent`, `PlayerBedEnterEvent`, `PlayerBedFailEnterEvent`, `PlayerBedLeaveEvent`, `PlayerBucketEntityEvent`, `PlayerBucketEvent`, `PlayerChangeBeaconEffectEvent`, `PlayerChangedMainHandEvent`, `PlayerChangedWorldEvent`, `PlayerChannelEvent`, `PlayerChatEvent`, `PlayerChatTabCompleteEvent`, `PlayerClientOptionsChangeEvent`, `PlayerCommandPreprocessEvent`, `PlayerCommandSendEvent`, `PlayerDeepSleepEvent`, `PlayerDropItemEvent`, `PlayerEditBookEvent`, `PlayerEggThrowEvent`, `PlayerElytraBoostEvent`, `PlayerExpChangeEvent`, `PlayerFishEvent`, `PlayerFlowerPotManipulateEvent`, `PlayerGameModeChangeEvent`, `PlayerHarvestBlockEvent`, `PlayerInteractEntityEvent`, `PlayerInteractEvent`, `PlayerItemBreakEvent`, `PlayerItemConsumeEvent`, `PlayerItemCooldownEvent`, `PlayerItemDamageEvent`, `PlayerItemHeldEvent`, `PlayerItemMendEvent`, `PlayerJoinEvent`, `PlayerJumpEvent`, `PlayerKickEvent`, `PlayerLaunchProjectileEvent`, `PlayerLecternPageChangeEvent`, `PlayerLevelChangeEvent`, `PlayerLocaleChangeEvent`, `PlayerLocaleChangeEvent`, `PlayerLoginEvent`, `PlayerLoomPatternSelectEvent`, `PlayerMoveEvent`, `PlayerNameEntityEvent`, `PlayerNaturallySpawnCreaturesEvent`, `PlayerPickupExperienceEvent`, `PlayerPickupItemEvent`, `PlayerPostRespawnEvent`, `PlayerPurchaseEvent`, `PlayerQuitEvent`, `PlayerReadyArrowEvent`, `PlayerRecipeBookClickEvent`, `PlayerRecipeDiscoverEvent`, `PlayerResourcePackStatusEvent`, `PlayerRespawnEvent`, `PlayerRiptideEvent`, `PlayerSetSpawnEvent`, `PlayerShearBlockEvent`, `PlayerShearEntityEvent`, `PlayerSpawnLocationEvent`, `PlayerStartSpectatingEntityEvent`, `PlayerStatisticIncrementEvent`, `PlayerStonecutterRecipeSelectEvent`, `PlayerStopSpectatingEntityEvent`, `PlayerSwapHandItemsEvent`, `PlayerTakeLecternBookEvent`, `PlayerToggleFlightEvent`, `PlayerToggleSneakEvent`, `PlayerToggleSprintEvent`, `PlayerUseUnknownEntityEvent`, `PlayerVelocityEvent`

public abstract class PlayerEvent extends Event
Represents a player related event

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Player`
`player`

## Constructor Summary

Constructors
Constructor
Description
`PlayerEvent(@NotNull Player who)`
`PlayerEvent(@NotNull Player who, boolean async)`

## Method Summary

Modifier and Type
Method
Description
`final @NotNull Player`
`getPlayer()`
Returns the player involved in this event

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, getHandlers, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### player

protected Player player

## Constructor Details

### PlayerEvent

public PlayerEvent(@NotNull @NotNull Player who)

### PlayerEvent

public PlayerEvent(@NotNull @NotNull Player who, boolean async)

## Method Details

### getPlayer

@NotNull public final @NotNull Player getPlayer()
Returns the player involved in this event

Returns:
  Player who is involved in this event