LeviLamina
Loading...
Searching...
No Matches
ScoreboardCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/Command.h"
7#include "mc/server/commands/WildcardCommandSelector.h"
8#include "mc/world/scores/ObjectiveSortOrder.h"
9#include "mc/world/scores/PlayerScoreSetFunction.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class CommandOrigin;
15class CommandOutput;
16class CommandRegistry;
17class Objective;
18class Scoreboard;
19struct ActorUniqueID;
20struct ScoreboardId;
21// clang-format on
22
24public:
25 // ScoreboardCommand inner types declare
26 // clang-format off
27 struct InitProxy;
28 struct SetScoreOutput;
29 // clang-format on
30
31 // ScoreboardCommand inner types define
32 struct InitProxy {
33 public:
34 // member variables
35 // NOLINTBEGIN
37 // NOLINTEND
38
39 public:
40 // prevent constructor by default
41 InitProxy& operator=(InitProxy const&);
42 InitProxy(InitProxy const&);
43 InitProxy();
44 };
45
47 public:
48 // member variables
49 // NOLINTBEGIN
53 // NOLINTEND
54
55 public:
56 // prevent constructor by default
57 SetScoreOutput& operator=(SetScoreOutput const&);
60
61 public:
62 // member functions
63 // NOLINTBEGIN
65 // NOLINTEND
66
67 public:
68 // destructor thunk
69 // NOLINTBEGIN
70 MCNAPI void $dtor();
71 // NOLINTEND
72 };
73
74 enum class Category : int {
75 Objectives = 0,
76 Players = 1,
77 };
78
79 enum class Action : int {
80 Invalid = 0,
81 Add = 1,
82 List = 2,
83 Operation = 3,
84 Random = 4,
85 Remove = 5,
86 Reset = 6,
87 Set = 7,
88 SetDisplay = 8,
89 Test = 9,
90 };
91
92public:
93 // member variables
94 // NOLINTBEGIN
112 // NOLINTEND
113
114public:
115 // prevent constructor by default
116 ScoreboardCommand& operator=(ScoreboardCommand const&);
118
119public:
120 // virtual functions
121 // NOLINTBEGIN
122 // vIndex: 2
123 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
124
125 // vIndex: 0
126 virtual ~ScoreboardCommand() /*override*/;
127 // NOLINTEND
128
129public:
130 // member functions
131 // NOLINTBEGIN
132 MCAPI ScoreboardCommand();
133
134 MCAPI void _generateCumulativeOutput(
135 ::ScoreboardCommand::SetScoreOutput const& cumulativeOutput,
136 ::Objective const& objective,
137 ::CommandOutput& output
138 ) const;
139
140 MCAPI ::Objective* _getObjective(
141 ::Scoreboard const& scoreboard,
142 ::std::string const& name,
143 bool forWrite,
144 ::CommandOutput& output
145 ) const;
146
147 MCAPI ::std::vector<::ScoreboardId> _getScoreboardIdsForSelector(
148 ::Scoreboard& scoreboard,
150 ::CommandOrigin const& origin,
151 ::CommandOutput& output,
152 bool shouldCreateMissingId
153 ) const;
154
155 MCAPI bool _getSelectorResultsForObjective(
156 ::std::vector<::ScoreboardId>& results,
157 ::Scoreboard& scoreboard,
159 ::Objective& objective,
160 ::CommandOrigin const& origin,
161 ::CommandOutput& output,
162 bool shouldCreateMissingId
163 ) const;
164
165 MCAPI void addObjective(
166 ::Scoreboard& scoreboard,
167 ::std::string const& name,
168 ::std::string const& criteriaName,
169 ::std::string const& displayName,
170 ::CommandOutput& output
171 ) const;
172
173 MCAPI void addPlayerScore(
174 ::Scoreboard& scoreboard,
175 ::PlayerScoreSetFunction fn,
176 ::ScoreboardId const& targetId,
177 ::Objective& objective,
178 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
179 ::CommandOutput& output,
181 ) const;
182
183 MCAPI bool applyPlayerOperation(
184 ::Scoreboard& scoreboard,
185 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
186 ::ScoreboardId const& targetId,
187 ::Objective& targetObjective,
188 ::Objective& objective,
189 ::CommandOrigin const& origin,
190 ::CommandOutput& output,
192 ) const;
193
194 MCAPI void listObjectives(::Scoreboard const& scoreboard, ::CommandOutput& output) const;
195
196 MCAPI void listPlayers(
197 ::Scoreboard& scoreboard,
198 ::ScoreboardId const& targetId,
199 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
200 ::CommandOutput& output
201 ) const;
202
203 MCAPI void objectives(::Scoreboard& scoreboard, ::CommandOrigin const& origin, ::CommandOutput& output) const;
204
205 MCAPI void players(::Scoreboard& scoreboard, ::CommandOrigin const& origin, ::CommandOutput& output) const;
206
207 MCAPI void removeObjective(::Scoreboard& scoreboard, ::std::string const& name, ::CommandOutput& output) const;
208
209 MCAPI void resetPlayer(
210 ::Scoreboard& scoreboard,
211 ::ScoreboardId const& targetId,
212 ::Objective* objective,
213 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
214 ::CommandOutput& output
215 ) const;
216
217 MCAPI void setDisplayObjective(
218 ::Scoreboard& scoreboard,
219 ::std::string const& displaySlotName,
220 ::std::string const& objectiveName,
221 ::ObjectiveSortOrder order,
222 ::CommandOutput& output
223 ) const;
224
225 MCAPI bool setPlayerRandomScore(
226 ::Scoreboard& scoreboard,
227 ::ScoreboardId const& targetId,
228 ::Objective& targetObjective,
229 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
230 ::CommandOutput& output,
232 ) const;
233
234 MCAPI void testPlayerScore(
235 ::ScoreboardId const& targetId,
236 ::Objective& objective,
237 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
238 ::CommandOutput& output
239 ) const;
240 // NOLINTEND
241
242public:
243 // static functions
244 // NOLINTBEGIN
245 MCAPI static ::std::vector<::std::string> _getNonSortableDisplaySlots(::Scoreboard& scoreboard);
246
247 MCAPI static ::std::vector<::std::string> _getSortableDisplaySlots(::Scoreboard& scoreboard);
248
249 MCAPI static void setup(::CommandRegistry& registry, ::ScoreboardCommand::InitProxy&& dependencies);
250 // NOLINTEND
251
252public:
253 // constructor thunks
254 // NOLINTBEGIN
255 MCAPI void* $ctor();
256 // NOLINTEND
257
258public:
259 // destructor thunk
260 // NOLINTBEGIN
261 MCAPI void $dtor();
262 // NOLINTEND
263
264public:
265 // virtual function thunks
266 // NOLINTBEGIN
267 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
268 // NOLINTEND
269
270public:
271 // vftables
272 // NOLINTBEGIN
273 MCNAPI static void** $vftable();
274 // NOLINTEND
275};
Definition Actor.h:103
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:45
Definition Command.h:17
Definition Objective.h:17
Definition Random.h:11
Definition ScoreboardCommand.h:23
static MCAPI void ** $vftable()
Definition Scoreboard.h:32
Definition WildcardCommandSelector.h:7
Definition ActorUniqueID.h:5
Definition ScoreboardCommand.h:32
Definition ScoreboardCommand.h:46
Definition ScoreboardId.h:10
Definition Alias.h:14