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

Log players joining/leaving the server #6

Open
2 of 4 tasks
mrghosti3 opened this issue Jan 25, 2023 · 4 comments
Open
2 of 4 tasks

Log players joining/leaving the server #6

mrghosti3 opened this issue Jan 25, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mrghosti3
Copy link
Owner

mrghosti3 commented Jan 25, 2023

Add functionality on top of Discord webhook (#2) to send notification on who is playing minecraft.

Tasks:

  • Implemented basic messages for player logging
  • Implemented message formatting
  • Check whether player rejoined after getting connection error and send a message accordingly if not rejoined
  • Don't send message of player joining the game if they rejoined after network error
@mrghosti3 mrghosti3 self-assigned this Jan 25, 2023
@mrghosti3
Copy link
Owner Author

Color for the embed message #ab274f

@mrghosti3
Copy link
Owner Author

mrghosti3 commented Mar 4, 2023

Progress as of 0a34bfe:

Currently I have implemented stateless message sending which is not ideal, as it doesn't cover a case where it doesn't send that a player left when they were kicked out or disconnected due to network issue. Ideally this could be solved by queuing up a task to check whether the player has returned to game and if not then sending OFFLINE message.

@mrghosti3
Copy link
Owner Author

For now I'm pushing the updates to master tagged as v0.2.1.

Short version of commit:
Made some changes to internal workings. Using already existing logger from extended JavaPlugin class. No more message MsgType enum for storing static premade messages, now it's just constants for when server going online or offline. The rest will be made accordingly when they are needed (ex. player joins). Removed unused code.

@mrghosti3 mrghosti3 added the enhancement New feature or request label Jul 6, 2023
@mrghosti3 mrghosti3 added this to the v0.4.0 milestone Aug 3, 2023
@mrghosti3
Copy link
Owner Author

Added another improvement to this, which now send those messages asynchronously, which takes less resources away from main thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant