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& actorHurtEvent) /*override*/;
33
34 virtual ::EventResult onEvent(::PlayerDamageEvent const& playerDamageEvent) /*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 virtual ::EventResult onBlockPlacedByPlayer(
45 ::Player& player,
46 ::Block const& placedBlock,
47 ::BlockPos const& pos,
48 bool isUnderwater
49 ) /*override*/;
50
51 virtual ~VanillaServerGameplayEventListener() /*override*/ = default;
52 // NOLINTEND
53
54public:
55 // virtual function thunks
56 // NOLINTBEGIN
57 MCFOLD ::EventResult $onEvent(::ActorHurtEvent const& actorHurtEvent);
58
59 MCFOLD ::EventResult $onEvent(::PlayerDamageEvent const& playerDamageEvent);
60
61 MCAPI ::EventResult $onEvent(::PlayerOpenContainerEvent const& playerOpenContainerEvent);
62
63 MCAPI ::EventResult $onActorCreationAttemptFailed(::Actor& actor, ::std::string_view message);
64
65 MCAPI ::EventResult $onActorCreated(::Actor& actor, ::ActorInitializationMethod initializationMethod);
66
67 MCAPI ::EventResult $onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos);
68
69 MCAPI ::EventResult
70 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
71
72
73 // NOLINTEND
74
75public:
76 // vftables
77 // NOLINTBEGIN
79
81
83
85 // NOLINTEND
86};
Definition Actor.h:105
Definition BlockPos.h:19
Definition Block.h:43
Definition EventListenerDispatcher.h:6
Definition Player.h:125
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