Skip to content
This repository has been archived by the owner on Dec 21, 2019. It is now read-only.

Fixed Rocket returning a fake UnturnedPlayer reference. #66

Closed
wants to merge 1 commit into from
Closed

Fixed Rocket returning a fake UnturnedPlayer reference. #66

wants to merge 1 commit into from

Conversation

SomeCatIDK
Copy link
Member

If someone were to specify the CSteamID of an offline or non-existent player, UnturnedPlayer.FromCSteamID will return a non-null UnturnedPlayer reference.

The PR will instead cause it to return a null reference.

(yes I know I screwed the commit message up :D)

… CSteamID is specified through UnturnedPlayer.FromName.
@CLAassistant
Copy link

CLAassistant commented Mar 12, 2018

CLA assistant check
All committers have signed the CLA.

@Trojaner
Copy link
Member

This will probably break some plugins

@Edsparr
Copy link

Edsparr commented Mar 12, 2018

Can't wait xd

@SomeCatIDK
Copy link
Member Author

Yeah, I can see where it could break some plugins, but I still think it would be useful.

@Edsparr
Copy link

Edsparr commented Mar 12, 2018

Wouden't it just be better if you made a bool where it said if the player is offline?

@SomeCatIDK
Copy link
Member Author

Possibly, but that would require changing the arguments or return type of this method, or creating a second.

@fr34kyn01535
Copy link
Collaborator

I'd prefer a boolean on the player that says its offline. This would prevent using methods that require an IRocketPlayer when people are offline.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants