From 747c2f133092187e5239432a2a123eaac6bf0caa Mon Sep 17 00:00:00 2001 From: virtualWinter Date: Fri, 21 Jul 2023 05:49:47 +0300 Subject: [PATCH] Add PlayerAttackEvent diff --git a/src/main/java/org/bukkit/event/player/PlayerAttackEvent.java b/src/main/java/org/bukkit/event/player/PlayerAttackEvent.java new file mode 100644 index 00000000..eb648e76 --- /dev/null +++ b/src/main/java/org/bukkit/event/player/PlayerAttackEvent.java @@ -0,0 +1,26 @@ +package org.bukkit.event.player; + +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; + +import lombok.Getter; + +public class PlayerAttackEvent extends PlayerEvent { + + @Getter private static HandlerList handlerList = new HandlerList(); + + @Getter private final Entity target; + + public PlayerAttackEvent(Player player, Entity target) { + super(player); + + this.target = target; + } + + @Override + public HandlerList getHandlers() { + return handlerList; + } + +} \ No newline at end of file -- 2.41.0.windows.1