Skip to content

Commit d4ae15a

Browse files
committed
Renamed PlayerEvent.Damage to Health
1 parent 1ae9081 commit d4ae15a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/main/java/com/lambda/mixin/entity/ClientPlayerEntityMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private void adjustSwing(AbstractClientPlayerEntity instance, Hand hand) {
170170

171171
@Inject(method = "updateHealth", at = @At("HEAD"))
172172
public void damage(float health, CallbackInfo ci) {
173-
EventFlow.post(new PlayerEvent.Damage(health));
173+
EventFlow.post(new PlayerEvent.Health(health));
174174
}
175175

176176
/**

src/main/kotlin/com/lambda/event/events/PlayerEvent.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ sealed class PlayerEvent {
5252
) : ICancellable by Cancellable()
5353

5454
/**
55-
* Represents a damage event for the player.
55+
* Represents a health update for the player.
5656
*
57-
* @property amount The amount of damage dealt.
57+
* @property amount The new player health.
5858
*/
59-
data class Damage(val amount: Float) : Event
59+
data class Health(val amount: Float) : Event
6060

6161
sealed class Interact {
6262
/**

src/main/kotlin/com/lambda/module/modules/combat/AutoDisconnect.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ object AutoDisconnect : Module(
9393
}
9494
}
9595

96-
listen<PlayerEvent.Damage> { event ->
96+
listen<PlayerEvent.Health> { event ->
9797
if (!onDamage) return@listen
9898

9999
val damageHandlers = listOf(

0 commit comments

Comments
 (0)