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
64 MCAPI ~SetScoreOutput();
65 // NOLINTEND
66
67 public:
68 // destructor thunk
69 // NOLINTBEGIN
70 MCFOLD 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*
141 _getObjective(::Scoreboard const& scoreboard, ::std::string const& name, bool forWrite, ::CommandOutput& output)
142 const;
143
144 MCAPI ::std::vector<::ScoreboardId> _getScoreboardIdsForSelector(
145 ::Scoreboard& scoreboard,
147 ::CommandOrigin const& origin,
148 ::CommandOutput& output,
149 bool shouldCreateMissingId
150 ) const;
151
152 MCAPI bool _getSelectorResultsForObjective(
153 ::std::vector<::ScoreboardId>& results,
154 ::Scoreboard& scoreboard,
156 ::Objective& objective,
157 ::CommandOrigin const& origin,
158 ::CommandOutput& output,
159 bool shouldCreateMissingId
160 ) const;
161
162 MCAPI void addObjective(
163 ::Scoreboard& scoreboard,
164 ::std::string const& name,
165 ::std::string const& criteriaName,
166 ::std::string const& displayName,
167 ::CommandOutput& output
168 ) const;
169
170 MCAPI void addPlayerScore(
171 ::Scoreboard& scoreboard,
172 ::PlayerScoreSetFunction fn,
173 ::ScoreboardId const& targetId,
174 ::Objective& objective,
175 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
176 ::CommandOutput& output,
178 ) const;
179
180 MCAPI bool applyPlayerOperation(
181 ::Scoreboard& scoreboard,
182 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
183 ::ScoreboardId const& targetId,
184 ::Objective& targetObjective,
185 ::Objective& objective,
186 ::CommandOrigin const& origin,
187 ::CommandOutput& output,
189 ) const;
190
191 MCAPI void listObjectives(::Scoreboard const& scoreboard, ::CommandOutput& output) const;
192
193 MCAPI void listPlayers(
194 ::Scoreboard& scoreboard,
195 ::ScoreboardId const& targetId,
196 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
197 ::CommandOutput& output
198 ) const;
199
200 MCAPI void objectives(::Scoreboard& scoreboard, ::CommandOrigin const& output, ::CommandOutput& origin) const;
201
202 MCAPI void players(::Scoreboard& scoreboard, ::CommandOrigin const& origin, ::CommandOutput& output) const;
203
204 MCAPI void removeObjective(::Scoreboard& scoreboard, ::std::string const& name, ::CommandOutput& output) const;
205
206 MCAPI void resetPlayer(
207 ::Scoreboard& scoreboard,
208 ::ScoreboardId const& targetId,
209 ::Objective* objective,
210 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
211 ::CommandOutput& output
212 ) const;
213
214 MCAPI void setDisplayObjective(
215 ::Scoreboard& scoreboard,
216 ::std::string const& displaySlotName,
217 ::std::string const& objectiveName,
218 ::ObjectiveSortOrder order,
219 ::CommandOutput& output
220 ) const;
221
222 MCAPI bool setPlayerRandomScore(
223 ::Scoreboard& scoreboard,
224 ::ScoreboardId const& targetId,
225 ::Objective& targetObjective,
226 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
227 ::CommandOutput& output,
229 ) const;
230
231 MCAPI void testPlayerScore(
232 ::ScoreboardId const& targetId,
233 ::Objective& objective,
234 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
235 ::CommandOutput& output
236 ) const;
237 // NOLINTEND
238
239public:
240 // static functions
241 // NOLINTBEGIN
242 MCAPI static ::std::vector<::std::string> _getNonSortableDisplaySlots(::Scoreboard& scoreboard);
243
244 MCAPI static ::std::vector<::std::string> _getSortableDisplaySlots(::Scoreboard& scoreboard);
245
246 MCAPI static void setup(::CommandRegistry& registry, ::ScoreboardCommand::InitProxy&& dependencies);
247 // NOLINTEND
248
249public:
250 // constructor thunks
251 // NOLINTBEGIN
252 MCAPI void* $ctor();
253 // NOLINTEND
254
255public:
256 // destructor thunk
257 // NOLINTBEGIN
258 MCAPI void $dtor();
259 // NOLINTEND
260
261public:
262 // virtual function thunks
263 // NOLINTBEGIN
264 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
265 // NOLINTEND
266
267public:
268 // vftables
269 // NOLINTBEGIN
270 MCAPI static void** $vftable();
271 // NOLINTEND
272};
Definition Actor.h:104
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:44
Definition Command.h:17
Definition Objective.h:17
Definition Random.h:16
Definition ScoreboardCommand.h:23
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