[BUG]: Player.Host is null when the Plugin is enabled
Before You Report
- [x] I have searched for existing reports of this bug, and this bug report is unique.
Version
1.1.4
Description
Player.Host is null when the Plugin is enabled
When enabled, creating examples requires the use of host.
To Reproduce
Detect the value of Player.Host when enabled
Expected Behavior
No response
Additional Information
I'm not sure if this counts as a bug. Perhaps there are other ways to obtain the Host?
You mean in your plugins Plugin::Enable method? I think the network server just hasn't loaded yet. You could move you logic into SeverEvent -> Waiting for players probably.
As Omega has mentioned, the server hasn't fully started yet when plugins are enabled.
The facility has to be loaded for the host to be created.
Use the WaitingForPlayers event, when the host is guaranteed to be not null.
Thank you both.