# PlayerWithdrawHeartEvent
> Fired when a player withdraws a heart as an item. Can be cancelled to prevent the withdrawal.
`gg.lode.observerapi.api.event`
---
## Signature
```java
public class PlayerWithdrawHeartEvent extends BaseEvent implements Cancellable
```
---
## Methods
### getPlayer
```java
public Player getPlayer()
```
**Returns:** `Player` - the player withdrawing the heart
---
### getHeartStack
```java
public ItemStack getHeartStack()
```
**Returns:** `ItemStack` - the heart item stack
---
### setHeartStack
```java
public void setHeartStack(ItemStack heartStack)
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `heartStack` | `ItemStack` | The new heart item stack |
---
### getWithdrawAmount
```java
public double getWithdrawAmount()
```
**Returns:** `double` - the amount of health being withdrawn
---
### setWithdrawAmount
```java
public void setWithdrawAmount(double withdrawAmount)
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `withdrawAmount` | `double` | The new withdrawal amount |
---
### getCancellationReason
```java
public @Nullable Component getCancellationReason()
```
**Returns:** `@Nullable Component` - the reason message for cancellation, or `null`
---
### setCancellationReason
```java
public void setCancellationReason(Component reason)
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `reason` | `Component` | The cancellation reason message |
---
### isCancelled
```java
public boolean isCancelled()
```
**Returns:** `boolean` - `true` if the event is cancelled
---
### setCancelled
```java
public void setCancelled(boolean cancelled)
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `cancelled` | `boolean` | Whether to cancel the event |
---
## Related Pages
- [[ILifestealManager]]
- [[PlayerConsumeHeartEvent]]