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