LeviLamina
Loading...
Searching...
No Matches
PermissionsHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Publisher.h"
7#include "mc/server/commands/CommandPermissionLevel.h"
8#include "mc/server/commands/PlayerPermissionLevel.h"
9
10// auto generated forward declare list
11// clang-format off
12class CompoundTag;
13namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
14// clang-format on
15
16class PermissionsHandler {
17public:
18 // PermissionsHandler inner types define
19 using PermissionsPublisher =
21
22 using PermissionsPublisherRefWrapper = ::std::reference_wrapper<
24
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<1, 1, ::CommandPermissionLevel> mCommandPermissions;
29 ::ll::TypedStorage<1, 1, ::PlayerPermissionLevel> mPlayerPermissions;
30 ::ll::TypedStorage<
31 8,
32 16,
34 mClientPlayerPermissionsPublisher;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 PermissionsHandler& operator=(PermissionsHandler const&);
40
41public:
42 // member functions
43 // NOLINTBEGIN
44 MCAPI PermissionsHandler();
45
46 MCAPI PermissionsHandler(::PermissionsHandler const& rhs);
47
48 MCAPI void addSaveData(::CompoundTag& tag) const;
49
50 MCFOLD ::CommandPermissionLevel getCommandPermissions() const;
51
52 MCFOLD ::PlayerPermissionLevel getPlayerPermissions() const;
53
54#ifdef LL_PLAT_C
55 MCAPI ::std::optional<::std::reference_wrapper<
57 getPlayerPermissionsChangedPublisher() const;
58#endif
59
60 MCAPI bool loadSaveData(::CompoundTag const& tag);
61
62 MCFOLD void setCommandPermissions(::CommandPermissionLevel permissions);
63
64 MCAPI void setPlayerPermissions(::PlayerPermissionLevel permissions);
65
66 MCAPI ~PermissionsHandler();
67 // NOLINTEND
68
69public:
70 // static functions
71 // NOLINTBEGIN
72#ifdef LL_PLAT_C
73 MCAPI static ::std::optional<::std::string>
74 getDiff(::PermissionsHandler const& lhs, ::PermissionsHandler const& rhs);
75#endif
76
77 MCAPI static ::PlayerPermissionLevel playerPermissionLevelFromString(::std::string const& s);
78
79 MCAPI static ::std::string playerPermissionLevelToString(::PlayerPermissionLevel const& permission);
80 // NOLINTEND
81
82public:
83 // static variables
84 // NOLINTBEGIN
85 MCAPI static ::std::string const& DIFF_COMMAND_PERMISSION();
86
87 MCAPI static ::std::string const& DIFF_PLAYER_PERMISSION();
88 // NOLINTEND
89
90public:
91 // constructor thunks
92 // NOLINTBEGIN
93 MCAPI void* $ctor();
94
95 MCAPI void* $ctor(::PermissionsHandler const& rhs);
96 // NOLINTEND
97
98public:
99 // destructor thunk
100 // NOLINTBEGIN
101 MCFOLD void $dtor();
102 // NOLINTEND
103};
Definition Publisher.h:8
Definition CompoundTag.h:23