LeviLamina
Loading...
Searching...
No Matches
PlayerListManager.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/deps/core/utility/pub_sub/Connector.h"
8#include "mc/deps/core/utility/pub_sub/Publisher.h"
9#include "mc/deps/core/utility/pub_sub/Subscription.h"
10#include "mc/platform/UUID.h"
11
12// auto generated forward declare list
13// clang-format off
14class EntityContext;
16class PacketSender;
17class PlayerListEntry;
21namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
22// clang-format on
23
24class PlayerListManager {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 64, ::std::unordered_map<::mce::UUID, ::PlayerListEntry>> mPlayerList;
29 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::PacketSender>> mPacketSender;
30 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::PlayerLocationReceiver>> mPlayerLocationReceiver;
31 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::PlayerLocationSender>> mPlayerLocationSender;
32 ::ll::TypedStorage<
33 8,
34 128,
36 void(::PlayerListEntry const&, ::std::unordered_map<::mce::UUID, ::PlayerListEntry> const&),
38 0>>
39 mOnPlayerListEntryAdded;
40 ::ll::TypedStorage<
41 8,
42 128,
44 void(::PlayerListEntry const&, ::std::unordered_map<::mce::UUID, ::PlayerListEntry> const&),
46 0>>
47 mOnPlayerListEntryRemoved;
48 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnGameplayUserAddedSubscription;
49 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnGameplayUserRemovedSubscription;
50 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnAnyGameplayUsersRemovedSubscription;
51 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerListPacket>> mPendingPlayerListRemovePacket;
52 // NOLINTEND
53
54public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI PlayerListManager();
58
59 MCAPI void _onAnyGameplayUsersRemoved();
60
61 MCAPI void _onGameplayUserAdded(::EntityContext& entity);
62
63 MCAPI void _onGameplayUserRemoved(::EntityContext& entity);
64
65 MCAPI void addPlayerEntry(::mce::UUID const& uuid, ::PlayerListEntry&& playerListEntry);
66
67#ifdef LL_PLAT_C
68 MCAPI void clearPlayerList();
69
70 MCFOLD ::Bedrock::PubSub::Connector<
71 void(::PlayerListEntry const&, ::std::unordered_map<::mce::UUID, ::PlayerListEntry> const&)>&
72 getOnPlayerListEntryAddedConnector();
73
74 MCFOLD ::Bedrock::PubSub::Connector<
75 void(::PlayerListEntry const&, ::std::unordered_map<::mce::UUID, ::PlayerListEntry> const&)>&
76 getOnPlayerListEntryRemovedConnector();
77#endif
78
79 MCFOLD ::std::unordered_map<::mce::UUID, ::PlayerListEntry> const& getPlayerList() const;
80
81 MCAPI ::std::string const& getPlayerPlatformOnlineId(::mce::UUID const& uuid) const;
82
83 MCAPI ::std::string const& getPlayerXUID(::mce::UUID const& uuid) const;
84
85 MCAPI void initializeWithGameplayUserManagerOnServer(::IGameplayUserManagerConnector& gameplayUserManagerConnector);
86
87 MCAPI void removeByUUID(::mce::UUID const& uuid);
88
89 MCAPI void setPacketSender(::PacketSender& packetSender);
90
91 MCAPI void setPlayerLocationReceiver(::Bedrock::NonOwnerPointer<::PlayerLocationReceiver> playerLocationReceiver);
92
93 MCAPI void setPlayerLocationSender(::Bedrock::NonOwnerPointer<::PlayerLocationSender> playerLocationSender);
94
95 MCAPI ::PlayerListEntry* tryGetPlayerEntry(::mce::UUID const& uuid);
96
97 MCAPI ~PlayerListManager();
98 // NOLINTEND
99
100public:
101 // constructor thunks
102 // NOLINTBEGIN
103 MCAPI void* $ctor();
104 // NOLINTEND
105
106public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCAPI void $dtor();
110 // NOLINTEND
111};
Definition NonOwnerPointer.h:9
Definition Publisher.h:8
Definition EntityContext.h:17
Definition IGameplayUserManagerConnector.h:14
Definition PacketSender.h:17
Definition PlayerListEntry.h:20
Definition PlayerListPacket.h:18
Definition PlayerLocationReceiver.h:14
Definition PlayerLocationSender.h:20
Definition UUID.h:7