LeviLamina
Loading...
Searching...
No Matches
PermissionsFile.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/server/FileReadResult.h"
8#include "mc/server/commands/CommandPermissionLevel.h"
9#include "mc/server/commands/PlayerPermissionLevel.h"
10
11// auto generated forward declare list
12// clang-format off
14class Player;
16namespace Core { class Path; }
17namespace Json { class Value; }
18// clang-format on
19
20class PermissionsFile {
21public:
22 // member variables
23 // NOLINTBEGIN
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
30 PermissionsFile& operator=(PermissionsFile const&);
31 PermissionsFile(PermissionsFile const&);
32 PermissionsFile();
33
34public:
35 // member functions
36 // NOLINTBEGIN
37#ifdef LL_PLAT_S
38 MCNAPI explicit PermissionsFile(::Core::Path const& filePath);
39#endif
40
42 ::Player& player,
43 ::UserEntityIdentifierComponent const& userIdentifier,
44 ::CommandPermissionLevel opCommandPermissionLevel
45 );
46
47 MCNAPI ::std::unordered_map<::std::string, ::PlayerPermissionLevel> const& getPermissions() const;
48
49 MCNAPI ::std::vector<::std::string> getXUIDsByPermission(::PlayerPermissionLevel permission) const;
50
51 MCNAPI bool isPermissionsSet(::std::string const& xuid, ::PlayerPermissionLevel permission) const;
52
54 ::UserEntityIdentifierComponent const& userIdentifier,
55 ::PlayerPermissionLevel permission
56 );
57
58 MCNAPI void persistPlayerPermissionsToDisk(::std::string const& xuid, ::PlayerPermissionLevel permission);
59
60 MCNAPI ::std::tuple<::FileReadResult, ::Json::Value> readPermissionFile();
61
62 MCNAPI ::FileReadResult reload();
63
64 MCNAPI ::FileReadResult reloadAndApply(
65 ::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager> userManager,
66 ::CommandPermissionLevel opCommandPermissionLevel
67 );
68
69#ifdef LL_PLAT_S
70 MCNAPI ~PermissionsFile();
71#endif
72 // NOLINTEND
73
74public:
75 // constructor thunks
76 // NOLINTBEGIN
77#ifdef LL_PLAT_S
78 MCNAPI void* $ctor(::Core::Path const& filePath);
79#endif
80 // NOLINTEND
81
82public:
83 // destructor thunk
84 // NOLINTBEGIN
85#ifdef LL_PLAT_S
86 MCNAPI void $dtor();
87#endif
88 // NOLINTEND
89};
Definition Path.h:12
Definition GameplayUserManager.h:22
Definition Value.h:16
MCAPI ::std::unordered_map<::std::string, ::PlayerPermissionLevel > const & getPermissions() const
MCAPI void persistPlayerPermissionsToDisk(::std::string const &xuid, ::PlayerPermissionLevel permission)
MCAPI void persistPlayerPermissionsToDisk(::UserEntityIdentifierComponent const &userIdentifier, ::PlayerPermissionLevel permission)
MCAPI ::std::vector<::std::string > getXUIDsByPermission(::PlayerPermissionLevel permission) const
MCAPI::FileReadResult reloadAndApply(::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager > userManager, ::CommandPermissionLevel opCommandPermissionLevel)
MCAPI bool isPermissionsSet(::std::string const &xuid, ::PlayerPermissionLevel permission) const
MCAPI ::std::tuple<::FileReadResult, ::Json::Value > readPermissionFile()
MCAPI void applyPlayerPermissionsFromDisk(::Player &player, ::UserEntityIdentifierComponent const &userIdentifier, ::CommandPermissionLevel opCommandPermissionLevel)
MCAPI::FileReadResult reload()
Definition Player.h:137
Definition UserEntityIdentifierComponent.h:17
Definition Alias.h:14