LeviLamina
Loading...
Searching...
No Matches
Command.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/CommandFlag.h"
7#include "mc/server/commands/CommandPermissionLevel.h"
8
9// auto generated forward declare list
10// clang-format off
11class CommandOrigin;
12class CommandOutput;
13class CommandRegistry;
15// clang-format on
16
17class Command {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<4, 4, int> mVersion;
22 ::ll::TypedStorage<8, 8, ::CommandRegistry const*> mRegistry;
23 ::ll::TypedStorage<4, 4, int> mCommandSymbol;
24 ::ll::TypedStorage<1, 1, ::CommandPermissionLevel> mPermissionLevel;
25 ::ll::TypedStorage<2, 2, ::CommandFlag> mFlags;
26 // NOLINTEND
27
28 LLNDAPI std::string getCommandName() const;
29
30public:
31 // virtual functions
32 // NOLINTBEGIN
33 virtual ~Command() = default;
34
35 virtual bool collectOptionalArguments();
36
37 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const = 0;
38 // NOLINTEND
39
40public:
41 // member functions
42 // NOLINTBEGIN
43 MCAPI void run(::CommandOrigin const& origin, ::CommandOutput& output) const;
44
45 MCAPI void sendTelemetry(::CommandOrigin const& origin, ::CommandOutput& output) const;
46 // NOLINTEND
47
48public:
49 // static functions
50 // NOLINTBEGIN
51 MCAPI static bool isWildcard(::CommandSelectorBase const& selector);
52
53 MCAPI static bool shouldUseCommandOriginRotation(::CommandOrigin const& origin, int version);
54
55 MCAPI static bool validRange(int input, int low, int high, ::CommandOutput& output);
56
57 MCAPI static bool validRange(float input, float low, float high, ::CommandOutput& output);
58 // NOLINTEND
59
60public:
61 // static variables
62 // NOLINTBEGIN
63#ifdef LL_PLAT_C
64 MCAPI static ::std::string const& WILDCARD_TOKEN();
65#endif
66 // NOLINTEND
67
68public:
69 // virtual function thunks
70 // NOLINTBEGIN
71 MCFOLD bool $collectOptionalArguments();
72
73
74 // NOLINTEND
75};
76
77// clang-format off
78template <>
79MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::std::unique_ptr<::Command, ::std::default_delete<::Command> >>();
80// clang-format on
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition CommandSelectorBase.h:28
Definition Command.h:17