Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove player from game and queue if they are moved to spectator #126

Merged
merged 6 commits into from
May 20, 2024

Conversation

dollannn
Copy link
Contributor

I made these changes to ensure it is compatible with a plugin such as AFKManager which only moves a player to spectator and has no way of knowing how to dequeue a player. Without this change players will be moved to spectator and then moved back into a team and actually never get kicked if you do not use an overly aggressive afk kick of 15 seconds without spectator. I made this for personal use but thought it might be benefit others

@B3none
Copy link
Owner

B3none commented May 19, 2024

These changes look great, are you able to move this logic into the relevant manager, I think I have separate team management logic in one of those where this code should be. If it can’t go there and it must go here then we can, I would also like to add a config option to give people the choice for how they would like to handle this. Basically just put it in an if statement with a config variable check.

@dollannn dollannn marked this pull request as ready for review May 19, 2024 20:30
@dollannn
Copy link
Contributor Author

Hope this resolves your comment, was unsure where to place the function but currently I put it in the GameManager class as it best fits there.

Copy link
Owner

@B3none B3none left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor tweaks, once those are addressed I'll make a release. Also please bump the plugin version const to 2.0.3 in RetakesPlugin.cs

README.md Outdated Show resolved Hide resolved
RetakesPlugin/Modules/Managers/GameManager.cs Outdated Show resolved Hide resolved
RetakesPlugin/Modules/Managers/GameManager.cs Outdated Show resolved Hide resolved
RetakesPlugin/Modules/Configs/RetakesConfigData.cs Outdated Show resolved Hide resolved
RetakesPlugin/Modules/Managers/GameManager.cs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
RetakesPlugin/Modules/Configs/RetakesConfigData.cs Outdated Show resolved Hide resolved
RetakesPlugin/RetakesPlugin.cs Show resolved Hide resolved
@dollannn
Copy link
Contributor Author

Bumped to 2.0.5 instead of 2.0.3 as we are on 2.0.4

Copy link
Owner

@B3none B3none left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted with the version, two minor tweaks and it’s good to merge.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@B3none B3none merged commit 87c5ec9 into B3none:master May 20, 2024
3 checks passed
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