Skip to content
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
English
English
简体中文
繁體中文
Auto
Light
Dark
Auto
Light
Dark
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Resources
LeviLamina on GitHub
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
API Reference
On this page
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Search
Ctrl
K
Loading...
Searching...
No Matches
ExecuteCommandEvent.h
1
#pragma once
2
3
#include "ll/api/base/Macro.h"
4
#include "ll/api/event/Cancellable.h"
5
#include "ll/api/event/Event.h"
6
7
#include "mc/deps/core/utility/MCRESULT.h"
8
#include "mc/server/commands/CommandContext.h"
9
#include "mc/server/commands/MinecraftCommands.h"
10
11
namespace
ll::event::inline command {
12
13
class
ExecuteCommandEvent :
public
Event {
14
MinecraftCommands
& mMinecraftCommands;
15
16
protected
:
17
CommandContext
& mCommandContext;
18
bool
& mSuppressOutput;
19
20
constexpr
explicit
ExecuteCommandEvent(
21
MinecraftCommands
& minecraftCommands,
22
CommandContext
& commandContext,
23
bool
& suppressOutput
24
)
25
: mMinecraftCommands(minecraftCommands),
26
mCommandContext(commandContext),
27
mSuppressOutput(suppressOutput) {}
28
29
public
:
30
LLAPI
void
serialize(
CompoundTag
&)
const override
;
31
32
LLNDAPI
MinecraftCommands
& minecraftCommands()
const
;
33
LLNDAPI
CommandContext
const
& commandContext()
const
;
34
LLNDAPI
bool
const
& suppressOutput()
const
;
35
};
36
class
ExecutingCommandEvent final :
public
Cancellable<ExecuteCommandEvent> {
37
public
:
38
constexpr
explicit
ExecutingCommandEvent(
39
MinecraftCommands
& minecraftCommands,
40
CommandContext
& commandContext,
41
bool
& suppressOutput
42
)
43
: Cancellable(minecraftCommands, commandContext, suppressOutput) {}
44
45
LLAPI
void
deserialize(
CompoundTag
const
&)
override
;
46
47
LLNDAPI
CommandContext
& commandContext()
const
;
48
LLNDAPI
bool
& suppressOutput()
const
;
49
};
50
class
ExecutedCommandEvent final :
public
ExecuteCommandEvent {
51
MCRESULT
& mResult;
52
53
public
:
54
constexpr
explicit
ExecutedCommandEvent(
55
MCRESULT
& result,
56
MinecraftCommands
& minecraftCommands,
57
CommandContext
& commandContext,
58
bool
& suppressOutput
59
)
60
: ExecuteCommandEvent(minecraftCommands, commandContext, suppressOutput),
61
mResult(result) {}
62
63
LLAPI
void
serialize(
CompoundTag
&)
const override
;
64
65
LLNDAPI
MCRESULT
& result()
const
;
66
};
67
}
// namespace ll::event::inline command
CommandContext
Definition
CommandContext.h:10
CompoundTag
Definition
CompoundTag.h:18
MinecraftCommands
Definition
MinecraftCommands.h:33
MCRESULT
Definition
MCRESULT.h:8
src
ll
api
event
command
ExecuteCommandEvent.h
Generated on
for LeviLamina by
1.16.1