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

Allow Local Default Channel #164

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Draesia
Copy link

@Draesia Draesia commented Feb 14, 2021

Description

Allows you to set a default channel per server.

What, briefly, is the purpose of this pull request?

This PR allows for Local Servers to set a default channel to which they join.

Is this pull request related to an issue with the plugin?

Yes. You cannot set a default local channel.

What is the status of this pull request? [e.g. In Development, Undergoing Final Testing, Ready]

Needs testing

Changes

What currently existing parts of the plugin are affected by this pull request

What new features are added to the plugin by this pull request

Adds the config value 'default_channel' in the local config. Allowing to set the default channel that the server will make players join

Standards

Does this pull request adhere to basic Java coding standards?

Yes

Is the pull request suitably javadoc'd? (E.g. Have you written detailed javadoc on all public methods)

Pretty much

Does this pull request seem to stay true to the style used so far in the MultiChat code.

Yes

Copy link
Contributor

@akshualy akshualy left a comment

Choose a reason for hiding this comment

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

Please change the value to be reloadable, then it should be fine?

@OllieMartin
Copy link
Contributor

I have just had a quick look over this but I am not sure if it will work as intended?

I could be wrong as it is very late here so I could be talking rubbish, but I think the way the channels work is as follows:

Bungee allocates player channel and sends this to spigot which is then stored in the local data structures.

This means that the player will join the bungee network, get assigned the default channel, and then this will be sent to the local spigot server and added to the map.

What you are doing is saying "if the map is empty, set the player's channel to the default in the local config".

Firstly, I am not sure the map will be empty, if bungee sends the message.

Second, even if it is empty, I think that bungee will probably just overwrite this when it does send the message?

I'll take another look soon to double check this, but I think there are some problems with this implementation.

@Draesia
Copy link
Author

Draesia commented Mar 10, 2021

You're likely right as it doesn't work after testing- however I'm not too sure on this whole bungee message channel stuffs; where could I find where the default channel is assigned for bungee? Could the same change could be made there also?

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.

3 participants