Package org.bukkit.event.entity

# Class ExpBottleEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.ProjectileHitEvent
org.bukkit.event.entity.ExpBottleEvent

All Implemented Interfaces:
  `Cancellable`

public class ExpBottleEvent extends ProjectileHitEvent
Called when a ThrownExpBottle hits and releases experience.

## Nested Class Summary

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

`Event.Result`

## Field Summary

### Fields inherited from class org.bukkit.event.entity.EntityEvent

`entity`

## Constructor Summary

Constructors
Constructor
Description
`ExpBottleEvent(@NotNull ThrownExpBottle bottle, int exp)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull ThrownExpBottle`
`getEntity()`
Returns the Entity involved in this event
`int`
`getExperience()`
This method retrieves the amount of experience to be created.
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`boolean`
`getShowEffect()`
This method indicates if the particle effect should be shown.
`void`
`setExperience(int exp)`
This method sets the amount of experience to be created.
`void`
`setShowEffect(boolean showEffect)`
This method sets if the particle effect will be shown.

### Methods inherited from class org.bukkit.event.entity.ProjectileHitEvent

`getHitBlock, getHitBlockFace, getHitEntity, isCancelled, setCancelled`

### Methods inherited from class org.bukkit.event.entity.EntityEvent

`getEntityType`

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

`callEvent, getEventName, isAsynchronous`

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

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

## Constructor Details

### ExpBottleEvent

public ExpBottleEvent(@NotNull @NotNull ThrownExpBottle bottle, int exp)

## Method Details

### getEntity

@NotNull public @NotNull ThrownExpBottle getEntity()
Description copied from class: `EntityEvent`
Returns the Entity involved in this event

Overrides:
  `getEntity` in class `ProjectileHitEvent`
Returns:
  Entity who is involved in this event

### getShowEffect

public boolean getShowEffect()
This method indicates if the particle effect should be shown.

Returns:
  true if the effect will be shown, false otherwise

### setShowEffect

public void setShowEffect(boolean showEffect)
This method sets if the particle effect will be shown.

This does not change the experience created.

Parameters:
  `showEffect` - true indicates the effect will be shown, false indicates no effect will be shown

### getExperience

public int getExperience()
This method retrieves the amount of experience to be created.

The number indicates a total amount to be divided into orbs.

Returns:
  the total amount of experience to be created

### setExperience

public void setExperience(int exp)
This method sets the amount of experience to be created.

The number indicates a total amount to be divided into orbs.

Parameters:
  `exp` - the total amount of experience to be created

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Overrides:
  `getHandlers` in class `ProjectileHitEvent`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()