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;
15class Player;
16// clang-format on
17
18class Command {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<4, 4, int> mVersion;
23 ::ll::TypedStorage<8, 8, ::CommandRegistry const*> mRegistry;
24 ::ll::TypedStorage<4, 4, int> mCommandSymbol;
25 ::ll::TypedStorage<1, 1, ::CommandPermissionLevel> mPermissionLevel;
26 ::ll::TypedStorage<2, 2, ::CommandFlag> mFlags;
27 // NOLINTEND
28
29 LLNDAPI std::string getCommandName() const;
30
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual ~Command();
35
36 virtual bool collectOptionalArguments();
37
38 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const = 0;
39 // NOLINTEND
40
41public:
42 // member functions
43 // NOLINTBEGIN
44 MCAPI Command();
45
46 MCFOLD ::CommandRegistry const& getRegistry() const;
47
48 MCAPI bool hasFlag(::CommandFlag flag) const;
49
50 MCAPI void run(::CommandOrigin const& origin, ::CommandOutput& output) const;
51
52 MCAPI void sendTelemetry(::CommandOrigin const& origin, ::CommandOutput& output) const;
53
54 MCAPI bool shouldSendTelemetry(::CommandOrigin const& origin) const;
55 // NOLINTEND
56
57public:
58 // static functions
59 // NOLINTBEGIN
60 MCAPI static ::Player* getPlayerFromOrigin(::CommandOrigin const& origin);
61
62 MCAPI static bool isTemplateLockedAction(::CommandOrigin const& origin);
63
64 MCAPI static bool isWildcard(::CommandSelectorBase const& selector);
65
66 MCAPI static bool shouldUseCommandOriginRotation(::CommandOrigin const& origin, int version);
67
68 MCAPI static bool validData(int input, ushort& data, ::CommandOutput& output);
69
70 MCAPI static bool validRange(int input, int low, int high, ::CommandOutput& output);
71
72 MCAPI static bool validRange(float input, float low, float high, ::CommandOutput& output);
73 // NOLINTEND
74
75public:
76 // static variables
77 // NOLINTBEGIN
78 MCAPI static ::std::string const& WILDCARD_TOKEN();
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84 MCAPI void* $ctor();
85 // NOLINTEND
86
87public:
88 // destructor thunk
89 // NOLINTBEGIN
90 MCFOLD void $dtor();
91 // NOLINTEND
92
93public:
94 // virtual function thunks
95 // NOLINTBEGIN
96 MCFOLD bool $collectOptionalArguments();
97
98
99 // NOLINTEND
100
101public:
102 // vftables
103 // NOLINTBEGIN
104 MCNAPI static void** $vftable();
105 // NOLINTEND
106};
107
108// clang-format off
109template <>
110MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::std::unique_ptr<::Command, ::std::default_delete<::Command> >>();
111// clang-format on
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition CommandSelectorBase.h:28
static MCAPI void ** $vftable()
Definition Player.h:137
Definition CommandFlag.h:43