You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases when a player connects and an OpenMod plugin modifies player experience UnturnedPlayerEvents.InternalOnExperienceChanged throws NRE. I suspect it's because an instance of UnturnedPlayerEvents component hasn't been attached to the player yet.
This could be fixed by adding a null check in the method but that's not a good solution because it would cause inconsistency in events.
The text was updated successfully, but these errors were encountered:
Adding a null check and a warning about event not being processed by rocket component. It's debatably better than exceptions.
I currently do not know of a good solution. Somehow we'd need to ensure that rocket component UnturnedPlayerEvents gets attached before OpenMod events are fired.
Maybe this is possible to do by reordering delegates in Provider.onServerConnected += OnPlayerConnected; ?
That doesn't solve the inconsistency issue. Ideally we want both openmod and rocketmod to assign their delegates before this event fires. So that neither of them misses it
Here:
https://github.com/SmartlyDressedGames/Legally-Distinct-Missile/blob/master/Rocket.Unturned/Events/UnturnedPlayerEvents.cs#L206-L212
In some cases when a player connects and an OpenMod plugin modifies player experience
UnturnedPlayerEvents.InternalOnExperienceChanged
throws NRE. I suspect it's because an instance ofUnturnedPlayerEvents
component hasn't been attached to the player yet.This could be fixed by adding a null check in the method but that's not a good solution because it would cause inconsistency in events.
The text was updated successfully, but these errors were encountered: