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/server/FileReadResult.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 Player;
14namespace Json { class Value; }
15// clang-format on
16
18public:
19 // member variables
20 // NOLINTBEGIN
23 // NOLINTEND
24
25public:
26 // prevent constructor by default
27 PermissionsFile& operator=(PermissionsFile const&);
30
31public:
32 // member functions
33 // NOLINTBEGIN
34 MCAPI void applyPlayerPermissionsFromDisk(
35 ::Player& player,
36 ::UserEntityIdentifierComponent const& userIdentifier,
37 ::CommandPermissionLevel opCommandPermissionLevel
38 );
39
40 MCAPI bool fileExists() const;
41
42 MCAPI ::std::vector<::std::string> getXUIDsByPermission(::PlayerPermissionLevel permission) const;
43
44 MCAPI bool isPermissionsSet(::std::string const& xuid, ::PlayerPermissionLevel permission) const;
45
46 MCAPI void persistPlayerPermissionsToDisk(
47 ::UserEntityIdentifierComponent const& userIdentifier,
48 ::PlayerPermissionLevel permission
49 );
50
51 MCAPI void persistPlayerPermissionsToDisk(::std::string const& xuid, ::PlayerPermissionLevel permission);
52
53 MCAPI ::std::tuple<::FileReadResult, ::Json::Value> readPermissionFile();
54
55 MCAPI ::FileReadResult reload();
56
57 MCAPI void setDefaultPlayerPermission(::Player& player, ::CommandPermissionLevel opCommandPermissionLevel);
58 // NOLINTEND
59};
Definition PermissionsFile.h:17
Definition Player.h:119
Definition UserEntityIdentifierComponent.h:19
Definition Alias.h:14