Skip to content

Customize error when a player is not allowed to join a lobby#136

Open
leonardochaia wants to merge 1 commit into
alvyxaz:masterfrom
leonardochaia:features/lobby-validation-error-message
Open

Customize error when a player is not allowed to join a lobby#136
leonardochaia wants to merge 1 commit into
alvyxaz:masterfrom
leonardochaia:features/lobby-validation-error-message

Conversation

@leonardochaia
Copy link
Copy Markdown
Contributor

This PR modifies the signature of BaseLobby.IsPlayerAllowed to include an out string error parameter in order to be able to return an error instead of the default "Player is not allowed" message.

Since this introduces a breaking change for classes who extend BaseLobby, maybe you'd prefer if it would be added as an overload instead. That'd be fine, just let me know and I can implement it, although I believe you'd want to give the user a hint of why he/she is not allowed to join, hence I prefer that the implementation forces you to do so.

Leo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants