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/CommandOperator.h"
8#include "mc/server/commands/CommandWildcardInt.h"
9#include "mc/server/commands/WildcardCommandSelector.h"
10#include "mc/world/scores/ObjectiveSortOrder.h"
11#include "mc/world/scores/PlayerScoreSetFunction.h"
12
13// auto generated forward declare list
14// clang-format off
15class Actor;
16class CommandOrigin;
17class CommandOutput;
18class CommandRegistry;
19class Objective;
20class Scoreboard;
21struct ActorUniqueID;
22struct ScoreboardId;
23// clang-format on
24
26public:
27 // ScoreboardCommand inner types declare
28 // clang-format off
29 struct InitProxy;
30 struct SetScoreOutput;
31 // clang-format on
32
33 // ScoreboardCommand inner types define
34 enum class Action : int {
35 Invalid = 0,
36 Add = 1,
37 List = 2,
38 Operation = 3,
39 Random = 4,
40 Remove = 5,
41 Reset = 6,
42 Set = 7,
43 SetDisplay = 8,
44 Test = 9,
45 };
46
47 enum class Category : int {
48 Objectives = 0,
49 Players = 1,
50 };
51
52 struct InitProxy {
53 public:
54 // member variables
55 // NOLINTBEGIN
56 ::ll::TypedStorage<8, 8, ::Scoreboard&> mScoreboard;
57 // NOLINTEND
58
59 public:
60 // prevent constructor by default
61 InitProxy& operator=(InitProxy const&);
62 InitProxy(InitProxy const&);
63 InitProxy();
64 };
65
67 public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<4, 4, int> mSuccessCount;
71 ::ll::TypedStorage<4, 4, int> mFirstNewScore;
72 ::ll::TypedStorage<8, 32, ::std::string> mFirstSuccess;
73 // NOLINTEND
74 };
75
76public:
77 // member variables
78 // NOLINTBEGIN
79 ::ll::TypedStorage<4, 4, ::ScoreboardCommand::Category> mCategory;
80 ::ll::TypedStorage<4, 4, ::ScoreboardCommand::Action> mAction;
81 ::ll::TypedStorage<8, 32, ::std::string> mObjective;
82 ::ll::TypedStorage<8, 32, ::std::string> mSourceObjective;
83 ::ll::TypedStorage<1, 1, ::ObjectiveSortOrder> mOrder;
84 ::ll::TypedStorage<8, 32, ::std::string> mCriteria;
85 ::ll::TypedStorage<8, 32, ::std::string> mName;
86 ::ll::TypedStorage<8, 32, ::std::string> mDisplayName;
87 ::ll::TypedStorage<8, 200, ::WildcardCommandSelector<::Actor>> mTargets;
88 ::ll::TypedStorage<8, 200, ::WildcardCommandSelector<::Actor>> mSources;
89 ::ll::TypedStorage<1, 1, ::CommandOperator> mOperator;
90 ::ll::TypedStorage<4, 8, ::CommandWildcardInt> mMin;
91 ::ll::TypedStorage<4, 8, ::CommandWildcardInt> mMax;
92 ::ll::TypedStorage<4, 4, int> mRandMin;
93 ::ll::TypedStorage<4, 4, int> mRandMax;
94 ::ll::TypedStorage<4, 4, int> mValue;
95 ::ll::TypedStorage<1, 1, bool> mTargetsSet;
96 // NOLINTEND
97
98public:
99 // virtual functions
100 // NOLINTBEGIN
101 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI ::Objective* _getObjective(
108 ::Scoreboard const& scoreboard,
109 ::std::string const& name,
110 bool forWrite,
111 ::CommandOutput& output
112 ) const;
113
114 MCAPI ::std::vector<::ScoreboardId> _getScoreboardIdsForSelector(
115 ::Scoreboard& scoreboard,
117 ::CommandOrigin const& origin,
118 ::CommandOutput& output,
119 bool shouldCreateMissingId
120 ) const;
121
122 MCAPI void addPlayerScore(
123 ::Scoreboard& scoreboard,
124 ::PlayerScoreSetFunction fn,
125 ::ScoreboardId const& targetId,
126 ::Objective& objective,
127 ::std::function<::std::string const&(::ActorUniqueID)> const& playerNameResolver,
128 ::CommandOutput& output,
130 ) const;
131
132 MCAPI void players(::Scoreboard& scoreboard, ::CommandOrigin const& origin, ::CommandOutput& output) const;
133 // NOLINTEND
134
135public:
136 // static functions
137 // NOLINTBEGIN
138 MCAPI static ::std::vector<::std::string> _getNonSortableDisplaySlots(::Scoreboard& scoreboard);
139
140 MCAPI static void setup(::CommandRegistry& registry, ::ScoreboardCommand::InitProxy&& dependencies);
141 // NOLINTEND
142
143public:
144 // virtual function thunks
145 // NOLINTBEGIN
146 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
147
148
149 // NOLINTEND
150};
Definition Actor.h:114
Definition CommandOrigin.h:31
Definition CommandOutput.h:20
Definition CommandRegistry.h:49
Definition Command.h:17
Definition Objective.h:15
Definition Random.h:10
Definition ScoreboardCommand.h:25
Definition Scoreboard.h:32
Definition WildcardCommandSelector.h:12
Definition ActorUniqueID.h:5
Definition ScoreboardCommand.h:52
Definition ScoreboardCommand.h:66
Definition ScoreboardId.h:11