LeviLamina
Loading...
Searching...
No Matches
PlayerAttackEvent.h
1#pragma once
2
3#include "ll/api/event/Cancellable.h"
4#include "ll/api/event/player/PlayerClickEvent.h"
5
6namespace ll::event::inline player {
7
8class PlayerAttackEvent final : public Cancellable<PlayerLeftClickEvent> {
9 Actor& mTarget;
10 ::SharedTypes::Legacy::ActorDamageCause const& mCause;
11
12public:
13 constexpr PlayerAttackEvent(Player& source, Actor& target, ::SharedTypes::Legacy::ActorDamageCause const& cause)
14 : Cancellable(source),
15 mTarget(target),
16 mCause(cause) {}
17
18 LLAPI void serialize(CompoundTag&) const override;
19
20 LLNDAPI Actor& target() const;
21 LLNDAPI ::SharedTypes::Legacy::ActorDamageCause const& cause() const;
22};
23} // namespace ll::event::inline player
Definition Actor.h:104
Definition CompoundTag.h:13
Definition Player.h:119
Definition PlayerAttackEvent.h:8
Definition serialize.h:11