LeviLamina
Loading...
Searching...
No Matches
CommandOrigin.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/crypto/random/Random.h"
5#include "mc/platform/UUID.h"
6
7// auto generated inclusion list
8#include "mc/common/SubClientId.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/server/commands/CommandOriginType.h"
11#include "mc/server/commands/CommandPermissionLevel.h"
12#include "mc/world/actor/player/AbilitiesIndex.h"
13
14// auto generated forward declare list
15// clang-format off
16class Actor;
17class BlockPos;
18class CommandArea;
20class CompoundTag;
21class Dimension;
22class ILevel;
23class Level;
25class Vec2;
26class Vec3;
29namespace mce { class UUID; }
30// clang-format on
31
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 16, ::mce::UUID> mUUID;
37 // NOLINTEND
38
39public:
40 CommandOrigin() { mUUID = Crypto::Random::generateUUID(); }
41
42public:
43 // virtual functions
44 // NOLINTBEGIN
45 // vIndex: 0
46 virtual ~CommandOrigin() = default;
47
48 // vIndex: 1
49 virtual ::std::string const& getRequestId() const = 0;
50
51 // vIndex: 2
52 virtual ::std::string getName() const = 0;
53
54 // vIndex: 3
55 virtual ::BlockPos getBlockPosition() const = 0;
56
57 // vIndex: 4
58 virtual ::Vec3 getWorldPosition() const = 0;
59
60 // vIndex: 5
61 virtual ::std::optional<::Vec2> getRotation() const = 0;
62
63 // vIndex: 6
64 virtual ::Level* getLevel() const = 0;
65
66 // vIndex: 7
67 virtual ::Dimension* getDimension() const = 0;
68
69 // vIndex: 8
70 virtual ::Actor* getEntity() const = 0;
71
72 // vIndex: 9
73 virtual ::CommandPermissionLevel getPermissionsLevel() const = 0;
74
75 // vIndex: 10
76 virtual ::std::unique_ptr<::CommandOrigin> clone() const = 0;
77
78 // vIndex: 11
79 virtual ::std::optional<::BlockPos> getCursorHitBlockPos() const;
80
81 // vIndex: 12
82 virtual ::std::optional<::Vec3> getCursorHitPos() const;
83
84 // vIndex: 13
85 virtual bool hasChatPerms() const;
86
87 // vIndex: 14
88 virtual bool hasTellPerms() const;
89
90 // vIndex: 15
91 virtual bool canUseAbility(::AbilitiesIndex ability) const;
92
93 // vIndex: 16
94 virtual bool isWorldBuilder() const;
95
96 // vIndex: 17
97 virtual bool canUseCommandsWithoutCheatsEnabled() const;
98
99 // vIndex: 18
100 virtual bool isSelectorExpansionAllowed() const;
101
102 // vIndex: 19
103 virtual ::NetworkIdentifier const& getSourceId() const;
104
105 // vIndex: 20
106 virtual ::SubClientId getSourceSubId() const;
107
108 // vIndex: 21
109 virtual ::CommandOrigin const& getOutputReceiver() const;
110
111 // vIndex: 22
112 virtual ::CommandOriginIdentity getIdentity() const;
113
114 // vIndex: 23
115 virtual ::CommandOriginType getOriginType() const = 0;
116
117 // vIndex: 24
118 virtual ::CommandOriginData toCommandOriginData() const;
119
120 // vIndex: 25
121 virtual ::mce::UUID const& getUUID() const;
122
123 // vIndex: 26
124 virtual void handleCommandOutputCallback(int, ::std::string&&) const;
125
126 // vIndex: 27
127 virtual void updateValues();
128
129 // vIndex: 28
130 virtual ::Vec3 const getExecutePosition(int version, ::CommandPositionFloat const& commandPosition) const;
131
132 // vIndex: 29
133 virtual ::CompoundTag serialize() const;
134
135 // vIndex: 30
136 virtual bool isValid() const = 0;
137
138 // vIndex: 31
139 virtual bool requiresValidLevel() const;
140
141 // vIndex: 32
142 virtual void _setUUID(::mce::UUID const& uuid);
143 // NOLINTEND
144
145public:
146 // member functions
147 // NOLINTBEGIN
148 MCAPI ::std::unique_ptr<::CommandArea> getAreaAt(::BlockPos const& pos, int commandVersion) const;
149
150 MCAPI ::std::unique_ptr<::CommandArea>
151 getAreaAt(::BlockPos const& min, ::BlockPos const& max, int commandVersion, bool allowUnloadedChunks) const;
152
153 MCAPI ::std::unique_ptr<::CommandArea>
154 getAreaAtWithBuffer(::BlockPos const& min, ::BlockPos const& max, int commandVersion, bool allowUnloadedChunks)
155 const;
156 // NOLINTEND
157
158public:
159 // static functions
160 // NOLINTBEGIN
161 MCAPI static ::std::unique_ptr<::CommandOrigin> fromCommandOriginData(
162 ::CommandOriginData const& data,
164 ::NetworkIdentifier const& sourceId,
165 ::SubClientId sourceSubId
166 );
167 // NOLINTEND
168
169public:
170 // static variables
171 // NOLINTBEGIN
172 MCAPI static ::NetworkIdentifier& sUnknownSource();
173 // NOLINTEND
174
175public:
176 // destructor thunk
177 // NOLINTBEGIN
178
179 // NOLINTEND
180
181public:
182 // virtual function thunks
183 // NOLINTBEGIN
184 MCFOLD ::std::optional<::BlockPos> $getCursorHitBlockPos() const;
185
186 MCFOLD ::std::optional<::Vec3> $getCursorHitPos() const;
187
188 MCAPI bool $hasChatPerms() const;
189
190 MCAPI bool $hasTellPerms() const;
191
192 MCFOLD bool $canUseAbility(::AbilitiesIndex ability) const;
193
194 MCAPI bool $isWorldBuilder() const;
195
196 MCFOLD bool $canUseCommandsWithoutCheatsEnabled() const;
197
198 MCAPI bool $isSelectorExpansionAllowed() const;
199
200 MCAPI ::NetworkIdentifier const& $getSourceId() const;
201
202 MCFOLD ::SubClientId $getSourceSubId() const;
203
204 MCFOLD ::CommandOrigin const& $getOutputReceiver() const;
205
206 MCAPI ::CommandOriginIdentity $getIdentity() const;
207
208 MCAPI ::CommandOriginData $toCommandOriginData() const;
209
210 MCFOLD ::mce::UUID const& $getUUID() const;
211
212 MCFOLD void $handleCommandOutputCallback(int, ::std::string&&) const;
213
214 MCFOLD void $updateValues();
215
216 MCAPI ::Vec3 const $getExecutePosition(int version, ::CommandPositionFloat const& commandPosition) const;
217
218 MCAPI ::CompoundTag $serialize() const;
219
220 MCFOLD bool $requiresValidLevel() const;
221
222 MCFOLD void $_setUUID(::mce::UUID const& uuid);
223 // NOLINTEND
224
225public:
226 // vftables
227 // NOLINTBEGIN
228 MCAPI static void** $vftable();
229 // NOLINTEND
230};
Definition Actor.h:104
Definition NonOwnerPointer.h:9
Definition BlockPos.h:18
Definition CommandArea.h:5
Definition CommandOrigin.h:32
Definition CommandPositionFloat.h:8
Definition CompoundTag.h:13
Definition Dimension.h:83
Definition ILevel.h:203
Definition Level.h:234
Definition NetworkIdentifier.h:11
Definition Vec2.h:5
Definition Vec3.h:10
Definition UUID.h:7
Definition CommandOriginData.h:13
Definition CommandOriginIdentity.h:5
Definition serialize.h:11