Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ScriptDedicatedServerUtils.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/PlayerPermissionLevel.h"
7#include "mc/util/IScriptDedicatedServerUtils.h"
8
9// auto generated forward declare list
10// clang-format off
11class AllowListFile;
12class CDNConfig;
13class DedicatedServer;
14class Level;
16class PermissionsFile;
17struct ScriptSettings;
19// clang-format on
20
21class ScriptDedicatedServerUtils : public ::IScriptDedicatedServerUtils {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 8, ::DedicatedServer&> mServer;
26 ::ll::TypedStorage<8, 8, ::AllowListFile&> mAllowListFile;
27 ::ll::TypedStorage<8, 8, ::PermissionsFile&> mPermissionsFile;
28 ::ll::TypedStorage<8, 8, ::CDNConfig&> mCDNConfig;
29 ::ll::TypedStorage<8, 8, ::Level*> mLevel;
30 ::ll::TypedStorage<8, 8, ::ScriptSettings*> mScriptSettings;
31 ::ll::TypedStorage<8, 8, ::MinecraftCommands*> mCommands;
32 ::ll::TypedStorage<8, 8, ::std::string const&> mSessionID;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 ScriptDedicatedServerUtils& operator=(ScriptDedicatedServerUtils const&);
38 ScriptDedicatedServerUtils(ScriptDedicatedServerUtils const&);
39 ScriptDedicatedServerUtils();
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 virtual ~ScriptDedicatedServerUtils() /*override*/ = default;
45
46 virtual void saveHold(::std::function<void(bool)>&& callback) /*override*/;
47
48 virtual void saveResume(::std::function<void(bool)>&& callback) /*override*/;
49
50 virtual ::std::optional<::std::vector<::SnapshotFilenameAndLength>> saveQuery() /*override*/;
51
52 virtual bool addToAllowList(::IScriptDedicatedServerUtils::AllowListEntryInfo const& identity) /*override*/;
53
54 virtual bool removeFromAllowList(::IScriptDedicatedServerUtils::AllowListEntryInfo const& identity) /*override*/;
55
56 virtual bool allowListContains(::IScriptDedicatedServerUtils::AllowListEntryInfo const& identity) /*override*/;
57
58 virtual ::std::vector<::IScriptDedicatedServerUtils::AllowListEntryInfo> getAllowListEntries() const /*override*/;
59
60 virtual void clearAllowList() /*override*/;
61
62 virtual bool reloadAllowListFile() /*override*/;
63
64 virtual void setAllowListEnabled(bool enabled) /*override*/;
65
66 virtual bool getAllowListEnabled() const /*override*/;
67
68 virtual bool reloadPermissionsFile() /*override*/;
69
70 virtual ::std::unordered_map<::std::string, ::PlayerPermissionLevel> const& getPermissions() const /*override*/;
71
72 virtual bool
73 setPermissions(::std::unordered_map<::std::string, ::PlayerPermissionLevel> const& permissionData) /*override*/;
74
75 virtual bool setPlayerPermission(::std::string const& xuid, ::PlayerPermissionLevel permission) /*override*/;
76
77 virtual bool reloadScriptConfig() /*override*/;
78
79 virtual bool reloadCDNConfig() /*override*/;
80
81 virtual ::std::string const& getSessionID() const /*override*/;
82
83 virtual void stopServer() /*override*/;
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCNAPI void $saveHold(::std::function<void(bool)>&& callback);
90
91 MCNAPI void $saveResume(::std::function<void(bool)>&& callback);
92
93 MCNAPI ::std::optional<::std::vector<::SnapshotFilenameAndLength>> $saveQuery();
94
96
98
100
101 MCNAPI ::std::vector<::IScriptDedicatedServerUtils::AllowListEntryInfo> $getAllowListEntries() const;
102
103 MCNAPI void $clearAllowList();
104
105 MCNAPI bool $reloadAllowListFile();
106
107 MCNAPI void $setAllowListEnabled(bool enabled);
108
109 MCNAPI bool $getAllowListEnabled() const;
110
112
113 MCNAPI ::std::unordered_map<::std::string, ::PlayerPermissionLevel> const& $getPermissions() const;
114
115 MCNAPI bool $setPermissions(::std::unordered_map<::std::string, ::PlayerPermissionLevel> const& permissionData);
116
117 MCNAPI bool $setPlayerPermission(::std::string const& xuid, ::PlayerPermissionLevel permission);
118
119 MCNAPI bool $reloadScriptConfig();
120
121 MCNAPI bool $reloadCDNConfig();
122
123 MCNAPI ::std::string const& $getSessionID() const;
124
125 MCNAPI void $stopServer();
126 // NOLINTEND
127};
Definition AllowListFile.h:13
Definition CDNConfig.h:9
Definition DedicatedServer.h:51
Definition IScriptDedicatedServerUtils.h:13
Definition Level.h:255
Definition MinecraftCommands.h:33
Definition PermissionsFile.h:20
MCAPI bool $addToAllowList(::IScriptDedicatedServerUtils::AllowListEntryInfo const &identity)
MCAPI bool $setPermissions(::std::unordered_map<::std::string, ::PlayerPermissionLevel > const &permissionData)
MCAPI void $setAllowListEnabled(bool enabled)
MCAPI void $saveResume(::std::function< void(bool)> &&callback)
MCAPI bool $removeFromAllowList(::IScriptDedicatedServerUtils::AllowListEntryInfo const &identity)
MCAPI ::std::optional<::std::vector<::SnapshotFilenameAndLength > > $saveQuery()
MCAPI ::std::unordered_map<::std::string, ::PlayerPermissionLevel > const & $getPermissions() const
MCAPI::std::string const & $getSessionID() const
MCAPI bool $setPlayerPermission(::std::string const &xuid, ::PlayerPermissionLevel permission)
MCAPI bool $reloadScriptConfig()
MCAPI bool $allowListContains(::IScriptDedicatedServerUtils::AllowListEntryInfo const &identity)
MCAPI ::std::vector<::IScriptDedicatedServerUtils::AllowListEntryInfo > $getAllowListEntries() const
MCAPI bool $getAllowListEnabled() const
MCAPI void $saveHold(::std::function< void(bool)> &&callback)
MCAPI bool $reloadAllowListFile()
MCAPI bool $reloadPermissionsFile()
Definition IScriptDedicatedServerUtils.h:21
Definition ScriptSettings.h:19
Definition SnapshotFilenameAndLength.h:5