Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Add permission to silently join/leave servers #175

Merged
merged 3 commits into from
Dec 3, 2023

Conversation

QarthO
Copy link
Contributor

@QarthO QarthO commented Dec 3, 2023

If join_and_quit_messages.join.enabled is set to true, the server won't send a join message (the ones handled by huskchat) to any players with the permission huskchat.silent_join

vice versa for the leave messages.

Copy link
Owner

@WiIIiam278 WiIIiam278 left a comment

Choose a reason for hiding this comment

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

Nice work; and I'm fine with this implementation. A few things:

  • Instead of single-line return statement, I prefer the return; in the guard clauses to be bracket-enclosed on its own line.
  • Could we make the permissions a private static final String constant at the top of the class (SILENT_JOIN_PERMISSION, SILENT_LEAVE_PERMISSION)
  • Style nit: could you add a space before the open bracket on the condition in the if statements?

added info in config
Copy link
Contributor Author

@QarthO QarthO left a comment

Choose a reason for hiding this comment

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

Updated requested changes and then renamed leave to quit to keep it consistent

Also added comments in config so people are aware of the new permission

@WiIIiam278 WiIIiam278 merged commit 7f8163a into WiIIiam278:master Dec 3, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants