LeviLamina
Loading...
Searching...
No Matches
VanillaServerGameplayEventListener.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/actor/ActorInitializationMethod.h"
7#include "mc/world/events/ActorEventListener.h"
8#include "mc/world/events/BlockEventListener.h"
9#include "mc/world/events/EventListenerDispatcher.h"
10#include "mc/world/events/EventResult.h"
11#include "mc/world/events/LevelEventListener.h"
12#include "mc/world/events/PlayerEventListener.h"
13
14// auto generated forward declare list
15// clang-format off
16class Actor;
17class Block;
18class BlockPos;
19class Player;
20struct ActorHurtEvent;
23// clang-format on
24
26 public ::EventListenerDispatcher<::BlockEventListener>,
27 public ::EventListenerDispatcher<::PlayerEventListener>,
28 public ::EventListenerDispatcher<::LevelEventListener> {
29public:
30 // virtual functions
31 // NOLINTBEGIN
32 virtual ::EventResult onEvent(::ActorHurtEvent const&) /*override*/;
33
34 virtual ::EventResult onEvent(::PlayerDamageEvent const&) /*override*/;
35
36 virtual ::EventResult onEvent(::PlayerOpenContainerEvent const& playerOpenContainerEvent) /*override*/;
37
38 virtual ::EventResult onActorCreationAttemptFailed(::Actor& actor, ::std::string_view message) /*override*/;
39
40 virtual ::EventResult onActorCreated(::Actor& actor, ::ActorInitializationMethod initializationMethod) /*override*/;
41
42 virtual ::EventResult onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos) /*override*/;
43
44#ifdef LL_PLAT_S
45 virtual ::EventResult
46 onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool) /*override*/;
47#else // LL_PLAT_C
48 virtual ::EventResult onBlockPlacedByPlayer(
49 ::Player& player,
50 ::Block const& placedBlock,
51 ::BlockPos const& pos,
52 bool isUnderwater
53 ) /*override*/;
54#endif
55
56 // NOLINTEND
57
58public:
59 // virtual function thunks
60 // NOLINTBEGIN
61 MCFOLD ::EventResult $onEvent(::ActorHurtEvent const&);
62
63 MCFOLD ::EventResult $onEvent(::PlayerDamageEvent const&);
64
65 MCAPI ::EventResult $onEvent(::PlayerOpenContainerEvent const& playerOpenContainerEvent);
66
67 MCAPI ::EventResult $onActorCreationAttemptFailed(::Actor& actor, ::std::string_view message);
68
69 MCAPI ::EventResult $onActorCreated(::Actor& actor, ::ActorInitializationMethod initializationMethod);
70
71 MCAPI ::EventResult $onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos);
72
73 MCAPI ::EventResult
74 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool);
75
76
77 // NOLINTEND
78
79public:
80 // vftables
81 // NOLINTBEGIN
83
85
87
89 // NOLINTEND
90};
Definition Actor.h:125
Definition BlockPos.h:21
Definition Block.h:69
Definition EventListenerDispatcher.h:6
Definition Player.h:137
Definition VanillaServerGameplayEventListener.h:28
static MCAPI void ** $vftableForEventListenerDispatcherBlockEventListener()
static MCAPI void ** $vftableForEventListenerDispatcherLevelEventListener()
static MCAPI void ** $vftableForEventListenerDispatcherActorEventListener()
static MCAPI void ** $vftableForEventListenerDispatcherPlayerEventListener()
Definition ActorHurtEvent.h:13
Definition PlayerDamageEvent.h:14
Definition PlayerOpenContainerEvent.h:11