LeviLamina
Loading...
Searching...
No Matches
CustomCommandRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/script_core/script_engine/scripting/ClosureGeneric.h"
7#include "mc/scripting/modules/minecraft/ScriptServerStateMonitor.h"
8#include "mc/scripting/modules/minecraft/commands/ScriptCustomCommandInterface.h"
9
10// auto generated forward declare list
11// clang-format off
12class CommandRegistry;
14namespace ScriptModuleMinecraft { class CommandClosureStorage; }
15namespace ScriptModuleMinecraft { struct ScriptCustomCommandError; }
16namespace ScriptModuleMinecraft { struct ScriptCustomCommandResult; }
17// clang-format on
18
19namespace ScriptModuleMinecraft {
20
21class CustomCommandRegistry : public ::ScriptModuleMinecraft::ScriptServerStateMonitor {
22public:
23 // CustomCommandRegistry inner types declare
24 // clang-format off
26 // clang-format on
27
28 // CustomCommandRegistry inner types define
30 public:
31 // PendingRegistrations inner types declare
32 // clang-format off
33 struct CommandData;
34 // clang-format on
35
36 // PendingRegistrations inner types define
37 struct CommandData {
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mAliasOpt;
42 ::ll::TypedStorage<8, 136, ::ScriptModuleMinecraft::ScriptCustomCommandInterface> mCommandInterface;
43 ::ll::TypedStorage<
44 8,
45 104,
47 mClosure;
48 // NOLINTEND
49 };
50
51 using CommandMap = ::std::unordered_map<
52 ::std::string,
54
55 using EnumNameValuesMap = ::std::unordered_map<::std::string, ::std::vector<::std::string>>;
56
57 using EnumValues = ::std::vector<::std::string>;
58
59 public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 32, ::std::string> mNamespace;
63 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::vector<::std::string>>> mEnums;
64 ::ll::TypedStorage<
65 8,
66 64,
67 ::std::unordered_map<
68 ::std::string,
70 mCommands;
71 // NOLINTEND
72
73 public:
74 // member functions
75 // NOLINTBEGIN
77 // NOLINTEND
78
79 public:
80 // destructor thunk
81 // NOLINTBEGIN
82 MCAPI void $dtor();
83 // NOLINTEND
84 };
85
86public:
87 // member variables
88 // NOLINTBEGIN
89 ::ll::TypedStorage<8, 8, ::CommandRegistry&> mCommandRegistry;
90 ::ll::TypedStorage<
91 8,
92 64,
93 ::std::unordered_map<::std::string, ::ScriptModuleMinecraft::CustomCommandRegistry::PendingRegistrations>>
94 mPendingRegistrationsByPack;
95 ::ll::TypedStorage<
96 8,
97 64,
98 ::std::unordered_map<::std::string, ::std::shared_ptr<::ScriptModuleMinecraft::CommandClosureStorage>>>
99 mRegisteredClosures;
100 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::std::string>>> mEnumNameStorage;
101 ::ll::TypedStorage<8, 64, ::std::unordered_set<::std::string>> mClaimedAliases;
102 // NOLINTEND
103
104public:
105 // prevent constructor by default
106 CustomCommandRegistry& operator=(CustomCommandRegistry const&);
107 CustomCommandRegistry(CustomCommandRegistry const&);
108 CustomCommandRegistry();
109
110public:
111 // virtual functions
112 // NOLINTBEGIN
113 virtual ~CustomCommandRegistry() /*override*/ = default;
114
115 virtual void _onScriptInitializationComplete() /*override*/;
116 // NOLINTEND
117
118public:
119 // member functions
120 // NOLINTBEGIN
121 MCAPI CustomCommandRegistry(::ServerScriptManagerEvents& events, ::CommandRegistry& commandRegistry);
122
123 MCAPI ::std::optional<::ScriptModuleMinecraft::ScriptCustomCommandError> _checkNamespaceConsistency(
125 ::std::string_view const newNamespace
126 ) const;
127
128 MCAPI ::ScriptModuleMinecraft::CustomCommandRegistry::PendingRegistrations&
129 _getOrCreatePendingRegistrationsForPack(::std::string const& packUUID, ::std::string_view const newNamespace);
130 // NOLINTEND
131
132public:
133 // constructor thunks
134 // NOLINTBEGIN
135 MCAPI void* $ctor(::ServerScriptManagerEvents& events, ::CommandRegistry& commandRegistry);
136 // NOLINTEND
137
138public:
139 // virtual function thunks
140 // NOLINTBEGIN
141 MCAPI void $_onScriptInitializationComplete();
142
143
144 // NOLINTEND
145
146public:
147 // vftables
148 // NOLINTBEGIN
149 MCNAPI static void** $vftable();
150 // NOLINTEND
151};
152
153} // namespace ScriptModuleMinecraft
Definition CommandRegistry.h:51
Definition CommandClosureStorage.h:16
Definition ScriptServerStateMonitor.h:16
Definition ClosureGeneric.h:8
Definition ScriptCustomCommandError.h:16
Definition ScriptCustomCommandResult.h:15
Definition ServerScriptManagerEvents.h:13