LeviLamina
Loading...
Searching...
No Matches
AllowList.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/UUID.h"
7#include "mc/server/IJsonSerializable.h"
8
9// auto generated forward declare list
10// clang-format off
11class AllowListEntry;
12namespace Json { class Value; }
13// clang-format on
14
15class AllowList : public ::IJsonSerializable {
16public:
17 // AllowList inner types declare
18 // clang-format off
20 // clang-format on
21
22 // AllowList inner types define
23 struct AllowListEntryMatcher {
24 public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 32, ::std::string> mName;
28 ::ll::TypedStorage<8, 32, ::std::string> mXuid;
29 ::ll::TypedStorage<8, 16, ::mce::UUID> mUuid;
30 // NOLINTEND
31
32 public:
33 // prevent constructor by default
34 AllowListEntryMatcher();
35
36 public:
37 // member functions
38 // NOLINTBEGIN
39 MCAPI AllowListEntryMatcher(::std::string name, ::std::string xuid, ::mce::UUID const& uuid);
40
41#ifdef LL_PLAT_S
42 MCAPI bool operator()(::AllowListEntry const& entry);
43#endif
44 // NOLINTEND
45
46 public:
47 // constructor thunks
48 // NOLINTBEGIN
49 MCAPI void* $ctor(::std::string name, ::std::string xuid, ::mce::UUID const& uuid);
50 // NOLINTEND
51 };
52
53public:
54 // member variables
55 // NOLINTBEGIN
56 ::ll::TypedStorage<8, 24, ::std::vector<::AllowListEntry>> mEntries;
57 ::ll::TypedStorage<8, 64, ::std::function<void()>> mSyncCallback;
58 // NOLINTEND
59
60#ifdef LL_PLAT_S
61#else // LL_PLAT_C
62public:
63 // prevent constructor by default
64 AllowList();
65
66#endif
67public:
68 // virtual functions
69 // NOLINTBEGIN
70 virtual ::Json::Value serialize() const /*override*/;
71
72 virtual void deserialize(::Json::Value const& root) /*override*/;
73
74#ifdef LL_PLAT_S
75 virtual ~AllowList() /*override*/ = default;
76#else // LL_PLAT_C
77 virtual ~AllowList() /*override*/;
78#endif
79
80 // NOLINTEND
81
82public:
83 // member functions
84 // NOLINTBEGIN
85#ifdef LL_PLAT_C
86 MCAPI explicit AllowList(::std::function<void()> syncCallback);
87#endif
88
89#ifdef LL_PLAT_S
90 MCAPI bool addByName(::std::string const& name);
91#endif
92
93 MCAPI bool isIgnoringPlayerLimit(::mce::UUID const& uuid, ::std::string const& xuid) const;
94
95#ifdef LL_PLAT_S
96 MCAPI bool removeByName(::std::string const& name);
97#endif
98
99 MCAPI void tryUpdateEntries(::mce::UUID const& uuid, ::std::string const& xuid, ::std::string const& name);
100 // NOLINTEND
101
102public:
103 // constructor thunks
104 // NOLINTBEGIN
105#ifdef LL_PLAT_C
106 MCAPI void* $ctor(::std::function<void()> syncCallback);
107#endif
108 // NOLINTEND
109
110public:
111 // destructor thunk
112 // NOLINTBEGIN
113 MCAPI void $dtor();
114 // NOLINTEND
115
116public:
117 // virtual function thunks
118 // NOLINTBEGIN
119 MCAPI ::Json::Value $serialize() const;
120
121 MCAPI void $deserialize(::Json::Value const& root);
122
123
124 // NOLINTEND
125
126public:
127 // vftables
128 // NOLINTBEGIN
129 MCNAPI static void** $vftable();
130 // NOLINTEND
131};
Definition AllowListEntry.h:14
static MCAPI void ** $vftable()
Definition IJsonSerializable.h:10
MCAPI void $dtor()
Definition Value.h:16
Definition UUID.h:7
Definition AllowList.h:23