# Heal

`com.jsmacrosce.jsmacros.client.api.event.impl.player.EventHeal`

**Since:** 1.6.5

**Cancellable:** No. Calling `event.cancel()` throws `UnsupportedOperationException`.

Fires before the local player's health is updated to a higher value. It reports the observed
change rather than its cause; [source](#com.jsmacrosce.jsmacros.client.api.event.impl.player.EventHeal_source) is always the generic damage type.  
```js
JsMacros.on("Heal", JavaWrapper.methodToJava(function (event) {
  Chat.log(`Healed ${event.change} hp, now at ${event.health} hp`);  
}))
```

## Constructors

### new EventHeal {#com.jsmacrosce.jsmacros.client.api.event.impl.player.EventHeal_constructor-DamageSource-float-float-}

```js
new EventHeal(DamageSource source, float health, float change)
```

Initializes the event with the message id from the supplied damage source and the supplied
health values; it does not update health or dispatch the event.

**Parameters:**
- `source`: damage source whose message id is captured; `null` causes [NullPointerException](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html).
- `health`: supplied health value
- `change`: supplied health-increase amount

## Fields

### change {#com.jsmacrosce.jsmacros.client.api.event.impl.player.EventHeal_change}

```js
change: float
```

Positive difference between the previous health value and the value being written, in health
points.

### health {#com.jsmacrosce.jsmacros.client.api.event.impl.player.EventHeal_health}

```js
health: float
```

Health value being written, in health points (two points per heart).

### source {#com.jsmacrosce.jsmacros.client.api.event.impl.player.EventHeal_source}

```js
source: String
```

Message id of the generic damage type; the cause of the health increase is not reported.

## Methods

### toString {#com.jsmacrosce.jsmacros.client.api.event.impl.player.EventHeal_toString-}

```js
toString(): String
```

Returns a diagnostic string containing the event name, stored health, and stored change.  
The source is omitted; the result is not a JSON serialization.

**Returns:** diagnostic text in the form `%s:{"health": %f, "change": %f}`
