LeviLamina
Loading...
Searching...
No Matches
ProjectCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/server/commands/ServerCommand.h"
8
9// auto generated forward declare list
10// clang-format off
11class CommandOrigin;
12class CommandOutput;
13class CommandRegistry;
14class Level;
15struct ActorUniqueID;
16// clang-format on
17
19public:
20 // ProjectCommand inner types define
21 enum class ExportSubcommandTypes : int {
22 None = 0,
23 Project = 1,
24 World = 2,
25 Template = 3,
26 };
27
28 enum class Subcommand : int {
29 None = 0,
30 Export = 1,
31 };
32
33 enum class TaskState : int {
34 Running = 0,
35 Complete = 1,
36 Error = 2,
37 };
38
39public:
40 // member variables
41 // NOLINTBEGIN
42 ::ll::TypedStorage<4, 4, ::ProjectCommand::Subcommand> mSubcommand;
43 ::ll::TypedStorage<4, 4, ::ProjectCommand::ExportSubcommandTypes> mExportSubcommandType;
44 // NOLINTEND
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
50 // NOLINTEND
51
52public:
53 // static functions
54 // NOLINTBEGIN
55 MCAPI static void _cleanupOutputDirOnExportFailure(::Core::PathBuffer<::std::string> const& pathToOutputDir);
56
57 MCAPI static void _exportSubcommand(
58 ::CommandOrigin const& output,
59 ::CommandOutput& commandExportType,
60 ::ProjectCommand::ExportSubcommandTypes callingPlayerUniqueId,
62 );
63
64 MCAPI static ::Core::PathBuffer<::std::string> _getLevelExportPath(
65 ::ActorUniqueID callingPlayerUniqueId,
66 ::Level* level,
67 ::std::string const& exportFileExtension
68 );
69
70 MCAPI static void _outputFormattedCommand(
71 ::ActorUniqueID callingPlayerUniqueId,
72 ::Level* level,
73 ::std::string const& prefix,
74 ::std::string const& commandType,
75 ::std::string const& msg,
76 ::std::vector<::std::string> const& args
77 );
78
79 MCAPI static void _reportErrorToUser(
80 ::ActorUniqueID callingPlayerUniqueId,
81 ::Level* level,
82 ::std::string const& commandType,
83 ::std::string const& msg,
84 ::std::vector<::std::string> const& args
85 );
86
87 MCAPI static void _reportToUser(
88 ::ActorUniqueID callingPlayerUniqueId,
89 ::Level* level,
90 ::std::string const& commandType,
91 ::std::string const& msg,
92 ::std::vector<::std::string> const& args
93 );
94
95 MCAPI static void setup(::CommandRegistry& registry);
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
102
103
104 // NOLINTEND
105
106public:
107 // vftables
108 // NOLINTBEGIN
109 MCNAPI static void** $vftable();
110 // NOLINTEND
111};
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition PathBuffer.h:8
Definition Level.h:255
Definition ProjectCommand.h:18
static MCAPI void ** $vftable()
Definition ServerCommand.h:22
Definition ActorUniqueID.h:10