Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Allow Local Default Channel#164

Open
Draesia wants to merge 3 commits intoMultiChat:master from
Draesia:feature/add-local-channel-default
Open

Allow Local Default Channel #164
Draesia wants to merge 3 commits intoMultiChat:master from
Draesia:feature/add-local-channel-default

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?

Draesia reacted with thumbs up emoji
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.

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

Reviewers

@akshualy akshualy akshualy approved these changes

@OllieMartin OllieMartin Awaiting requested review from OllieMartin

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /